Skip to content

Instantly share code, notes, and snippets.

View judgej's full-sized avatar

Jason Judge judgej

View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@dlively1
dlively1 / gist:5858513
Last active December 26, 2021 17:36
Sugar 7 Web Services using Guzzle PHP
<?php
require_once 'vendor/autoload.php';
use Guzzle\Http\Client;
$user = '<<user>>';
$password = '<<password>>';
$url = '<<baseurl>>/rest/v10/';
$client = new Client($url);
@messified
messified / php-interview.md
Last active May 24, 2024 05:56
PHP Engineer Interview: What you should know

PHP Developer Interview: What you should know

1. What’s the difference between " self " and " this " ?

Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.

Source: When to use self vs this -stackoverflow

@zQueal
zQueal / awesome-php.md
Last active December 16, 2019 18:39 — forked from ziadoz/awesome-php.md
@davidbehan
davidbehan / install-multiple-php-in-plesk
Last active December 17, 2015 15:54
Script for installing multiple php versions in plesk 11.5
# FROM: http://forum.parallels.com/showthread.php?290399-Plesk-11-5-Easy-Install-Script-for-Multiple-PHP-CentOS-6-4-x64
yum -y install gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-devel bzip2-devel libjpeg-devel libpng-devel freetype-devel openldap-devel postgresql-devel aspell-devel net-snmp-devel libxslt-devel libc-client-devel libicu-devel gmp-devel curl-devel libmcrypt-devel unixODBC-devel pcre-devel sqlite-devel db4-devel enchant-devel libXpm-devel mysql-devel readline-devel libedit-devel recode-devel libtidy-devel
phpconfigureflagscommon="--with-libdir=lib64 --cache-file=./config.cache --prefix=/usr/local/php-\$phpversion-\$phptype --with-config-file-path=/usr/local/php-\$phpversion-\$phptype/etc --disable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-freetype-dir=/usr/local/php-\$phpversion-\$phptype --with-png-dir=/usr/local/php-\$phpversion-\$phptype --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr/local/php-\$ph
@VjWoo
VjWoo / th_shipping_options.php
Created February 23, 2015 14:52
Shipping Options plugin
<?php
/*
Plugin Name: TH Shipping Options
Plugin URI: NA
Description: TH Shipping Options plugin
Version: 1.0.0
Author: Vj
Author URI: www.wooforce.com
*/
@r-a-y
r-a-y / warnings.php
Last active August 17, 2023 11:46
Suppress warnings created by certain plugins and themes in WordPress.
/**
* Suppress errors generated by specified WordPress plugins.
*
* Put this in /wp-content/mu-plugins/
*
* @param string $errno The error number.
* @param string $errstr The error message.
* @param string $errfile Path to the file that caused the error.
* @param int $errline Line number of the error.
* @return bool True to suppress error reporting; false to use default error handler.
@dhilipsiva
dhilipsiva / SpamTwooUsers.coffee
Last active August 9, 2022 03:29
Spam Twoo Users
getPage = (url) ->
$.get url
.done (response, success, xhr) ->
results = $ JSON.parse(response).html
for result in results.find ".card--gridFlex"
d1 = $ result
profile_id = d1.find(".jsCard").attr "id"
continue if !profile_id
profile_id = profile_id.replace "profile_", ""
data =
@ygotthilf
ygotthilf / jwtRS256.sh
Last active June 27, 2024 16:13
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@coldclimate
coldclimate / Instructions
Created October 17, 2015 13:26
Installing Supervisord on Centos 66
Based on http://www.alphadevx.com/a/455-Installing-Supervisor-and-Superlance-on-CentOS
Vgrnt box used: https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.0.0/centos-6.6-x86_64.box
sudo yum install python-setuptools
sudo easy_install supervisor
supervisord --version
echo_supervisord_conf | sudo tee /etc/supervisord.conf
sudo mkdir -p /etc/supervisord/conf.d/
sudo vi /etc/init.d/supervisord