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 install -o root -g root -m 0600 /dev/null /swapfile | |
dd if=/dev/zero of=/swapfile bs=1k count=2048k | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab | |
sudo sysctl -w vm.swappiness=10 | |
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "", | |
"Effect": "Allow", | |
"Principal": { | |
"Service": [ | |
"elasticmapreduce.amazonaws.com", | |
"datapipeline.amazonaws.com" |
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
#old config | |
[gitflow "prefix"] | |
feature = feature/ | |
release = release/ | |
hotfix = hotfix/ | |
support = support/ | |
versiontag = pr_ | |
#new config | |
[gitflow "prefix"] |
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
function breakString($string){ | |
$stringArray = explode(" ", $string); | |
if(is_array($stringArray)){ | |
foreach($stringArray as $index => $substring){ | |
if(strlen($substring) > 30){ | |
$subsubStrings = str_split($substring, 30); | |
$stringArray[$index] = implode(" ", $subsubStrings); | |
} | |
} | |
} |
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
# @gf3’s Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt" | |
# Shamelessly copied from https://github.com/gf3/dotfiles | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color | |
elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color | |
fi | |
if tput setaf 1 &> /dev/null; then | |
tput sgr0 | |
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then |
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 | |
require_once 'init.php'; | |
$resolvity = new Turbodoc_Resolvity('accounts'); | |
$response = $resolvity->request('GET'); | |
$numbers = json_decode($response, true); |
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 | |
### BEGIN INIT INFO | |
# Provides: elasticsearch | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts elasticsearch | |
# Description: Starts elasticsearch using start-stop-daemon | |
### END INIT INFO |
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/bash | |
### BEGIN INIT INFO | |
# Provides: graylog2 | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts graylog2 | |
# Description: Starts graylog2 using start-stop-daemon | |
### END INIT INFO |
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
mongo | |
> use admin | |
> db.addUser('admin', 'AdminPassword') | |
> db.auth('admin', 'AdminPassword') | |
> use graylog2 | |
> db.addUser('grayloguser', '123') | |
> db.auth('grayloguser', '123') | |
> exit |
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 DND Status of given phone number. | |
* | |
*/ | |
require_once 'init.php'; | |
class updateDNDStatus | |
{ |
OlderNewer