Skip to content

Instantly share code, notes, and snippets.

View easterncoder's full-sized avatar
💭
.

Mike Lopez easterncoder

💭
.
View GitHub Profile
@easterncoder
easterncoder / x.c
Last active November 5, 2025 14:35
#include <stdio.h>
int main() {
char student_name[100];
int answer[5];
int score = 0;
int i;
int status;
printf("Enter student name: ");
<?php
echo "Enter student name: ";
$student_name = trim(fgets(STDIN));
for($i = 1; $i <= 5; $i++) {
echo "Enter Answer #$i: ";
$answer[] = trim(fgets(STDIN));
}
$score = 0;
@easterncoder
easterncoder / .keynavrc
Created July 4, 2025 16:46
keynav config
clear
ctrl+semicolon start,grid 6x6
g grid-nav toggle
Escape end
ctrl+bracketleft end
q record ~/.keynav_macros
shift+at playback
a history-back
Left cut-left
Down cut-down
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
/**
* counterACT GPS Tracking System
*
* This program uses the TinyGPS++ library to track the location of a device
* and send an SMS message to a recipient when the location changes significantly.
*
* Team Members:
@easterncoder
easterncoder / hindi-ipinagkait.txt
Created December 13, 2023 19:57
Hindi Ipinagkait
Hindi Ipinagkait
---
Intro:
C /// Bm7 / Em /
C /// Bm7 / Em /
Am /// Dsus4 / A
---
@easterncoder
easterncoder / docker-compose.yml
Created March 17, 2023 16:03
WordPress Quick Setup with docker-compose.yml
# Quick WordPress setup with Docker Compose. Includes wp-c
# By: Mike Lopez <e@mikelopez.com>
#
# Use .env file to change configuration variables.
# Configuration variables and their default values are:
# MYSQL_ROOT_PASSWORD=mysql_root_password_123
# UID=1000
# GID=1000
# PORT=80
# DBNAME=wordpress
@easterncoder
easterncoder / pre-commit-phpcs-check.sh
Last active December 28, 2021 17:11
PHPCS SVN Pre-commit
#!/bin/bash
# executables
SVNLOOK="/usr/bin/svnlook"
PHPCS="/path/to/composer/vendor/bin/phpcs"
# parameters
REPOS="$1"
TXN="$2"
import geopy
from geopy.distance import distance
# point of reference
lat = 8.000688 #8 00' 02.478"
lon = 125.023 #125 01' 22.960"
# coordinates from point of reference
coords = [
{
@easterncoder
easterncoder / rpw
Last active June 11, 2021 07:52
Script to resize and position an X11 window using wmctrl
#!/bin/bash
# Help
if [ "help" == "$1" ]
then
less <<EOF
Resize and position a window.
Usage:
rpw window_substring [dimension [position]]
@easterncoder
easterncoder / ohYeeph7shy.php
Last active January 25, 2021 21:31
Sample code for wishlistmember_add_user_levels and wishlistmember_remove_user_levels hooks
<?php
/**
* Sample code for wishlistmember_add_user_levels and wishlistmember_remove_user_levels hooks
* @author Mike Lopez, WishList Products
*/
// when membership level are added to a user
add_action( 'wishlistmember_add_user_levels', 'foo', 10, 3 );