Skip to content

Instantly share code, notes, and snippets.

View eshleebien's full-sized avatar

Esh Romero eshleebien

  • Manila, Philippines
View GitHub Profile
rds-modify-db-parameter-group {param-group-name} \
--parameters="name=character_set_server, value=utf8, method=pending-reboot" \
--parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \
--parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \
--parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \
--parameters="name=query_cache_type, value=1, method=pending-reboot" \
--parameters="name=query_cache_size, value=131072, method=pending-reboot" \
--parameters="name=table_open_cache, value=2500, method=pending-reboot" \
--parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \
--parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \
@eshleebien
eshleebien / talkative-octo-pussy.md
Created November 17, 2015 11:48 — forked from jekku/talkative-octo-pussy.md
Sending an SMS thru the Chikka SMS API

##Module that sends an SMS thru the Chikka API

'use strict';

var util = require('../../helpers/util'),
    superagent = require('superagent'),
    config = {
        endpoint : 'https://post.chikka.com/smsapi/request',
 shortcode : /*Your shortcode here*/,
@eshleebien
eshleebien / nginx.lb.conf
Created January 8, 2016 06:32 — forked from fukata/nginx.lb.conf
nginx proxy cache gzipped contents
http {
upstream web_backend {
server web01:80;
server web02:80;
}
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=cache-space:100m max_size=1024m inactive=1h;
proxy_temp_path /var/cache/nginx/tmp;
server {
@eshleebien
eshleebien / installphp7.sh
Created January 8, 2016 07:38 — forked from tronsha/installphp7.sh
Install PHP7 to Ubuntu
#!/bin/bash
apt-get update
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev
mkdir -p /etc/php7/conf.d
mkdir -p /etc/php7/cli/conf.d
mkdir /usr/local/php7
cd /tmp
git clone https://github.com/php/php-src.git --depth=1
cd php-src
./buildconf
@eshleebien
eshleebien / modx-programmatic-user-login.php
Created January 12, 2016 07:32 — forked from itskingori/modx-programmatic-user-login.php
Log in a user programmatically in MODx, answer (hopefully) to a question posted in the forums here; http://forums.modx.com/thread/86714/is-it-possible-to-login-a-user-programmatically-in-frontend
<?php
$id = 1; // just an example ... use appropriate id
$user = $this -> modx -> getObject('modUser', $id);
if (!$user -> hasSessionContext('web')) {
$user -> addSessionContext('web');
}
@eshleebien
eshleebien / .env.travis
Created March 22, 2016 02:18 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@eshleebien
eshleebien / gist:a7e1764cb7ba891b25a01b61885edfc4
Created April 1, 2016 08:06 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
location ~* "^(.+)-[0-9a-f]{32}(\.(.*))$" {
try_files $uri $1$2 =404;
}
@eshleebien
eshleebien / php7_build_ubuntu.sh
Last active May 13, 2016 07:30 — forked from m1st0/php_build_ubuntu.sh
Compiling PHP 7 on Ubuntu 15.04 with Various Supported Modules
#! /bin/bash
## PHP 7 Initial Compile ##
## Some help from the various places like these. ##
# http://www.zimuel.it/install-php-7/
# http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu
## Setup Ubuntu 15.04/15.10 ##
# Other dependencies for PHP 7. Add any missing ones from configure script
# complaints, plus some LAMP needs too.
@eshleebien
eshleebien / mysql-rename-db.sh
Created April 15, 2016 08:18 — forked from tadas-s/mysql-rename-db.sh
MySQL database rename script
#!/bin/bash
# Disclaimer - make backups, use at your own risk.
#
# Based on this comment: http://stackoverflow.com/a/13944924/843067
# Views and stored procedures have to be done separately.
OLDDB="old_db_name"
NEWDB="new_db_name"
MYSQL="mysql -u root -pyour_password "