Skip to content

Instantly share code, notes, and snippets.

@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 );
@easterncoder
easterncoder / ifttt-filter-find-calendar-slot.js
Last active October 7, 2020 00:04
IFTTT Filter to search for a 1-hour slot in Google Calendar to schedule our event in
/*
* Author: Mike Lopez <e@mikelopez.com>
* Description: Find a 1-hour slot in Google Calendar to schedule our event in
*/
// sort events by start date (because nope, they're not sorted)
GoogleCalendar.listEventsForDateRange.sort(function(a, b) {
if (moment(a.Start).isSame(b.Start)) {
return 0;
}
@easterncoder
easterncoder / Vagrantfile
Last active August 17, 2020 05:25
Ubuntu Focal Fossa LAMP Stack
Vagrant.configure("2") do |config|
# we use the generic ubuntu 20.04 box
config.vm.box = "generic/ubuntu2004"
# set the local hostname to myapp.local
# you may change this to whatever you like but it's best to keep the .local part
config.vm.hostname = 'myapp.local'
# sync folders
config.vm.allowed_synced_folder_types = [:nfs, :smb, :sshfs, :rsync]
@easterncoder
easterncoder / 01.md
Last active April 20, 2020 17:21
WishList Member WebHooks Integration Technical Demo