These instructions install ruby and rubygems from source, not from RPMs. For instructions on installing from RPMs, look at something like http://wiki.opscode.com/display/chef/Installation+on+RHEL+and+CentOS+5+with+RPMs or http://mykestubbs.com/blog/2010/03/chef-installation-on-centos-54.html
This file contains hidden or 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
| var http = require('http'); | |
| var pg = require('pg'); | |
| var connectionString = "pg://chartjes:********@localhost:5432/ibl_stats"; | |
| pg.connect(connectionString, function(err, client) { | |
| if (err) { | |
| console.log(err); | |
| } else { | |
| http.createServer(function(request, response) { | |
| response.writeHead(200, {'Content-Type': 'text/html'}); |
This file contains hidden or 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
| public function gravatar($email, $size = 70, $default = "monsterid") { | |
| return "http://www.gravatar.com/avatar/" . | |
| md5(strtolower($email)) . | |
| "?s=" . (integer) $size . | |
| "&d=" . urlencode($default) . | |
| "&r=G"; | |
| } |
This file contains hidden or 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 | |
| # Set these variables | |
| USER_NAME="you@example.com" | |
| API_KEY="XXXXXXXX_YOUR_DHQ_API_KEY_XXXXXXXXXXXXX" | |
| START_REV='SOME_ARBITRARY_GIT_REVISION_HASH_TO_START_FROM' | |
| DHQ_API_PROJ="your-project-shortname" | |
| DHQ_BASE_URL="https://yoursite.deployhq.com/" | |
| DHQ_SERVER_GROUP="YOUR_SERVER_GROUP_UUID" | |
| DHQ_SERVER_USERNAME="your-server-username" |
This file contains hidden or 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
| SSH_FORWARD_PROMPT=true | |
| export PS1="\n[\[\e[32m\]\t\[\e[m\] \[\e[31m\]\u\[\e[m\]@\[\e[36m\]\H\[\e[m\]][\[\e[32m\]\$?\[\e[m\]]\[\e[33m\]\`/usr/sbin/getenforce\`\[\e[m\]\n\w:\!> " | |
| function ssh_forward_prompt() | |
| { | |
| env ssh -A "$@" -t "PS1='$PS1' bash -l" | |
| } | |
| if [ "$SSH_FORWARD_PROMPT" = true ] ; then |
This file contains hidden or 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 | |
| # @source: https://gist.github.com/ronanguilloux/11f6a788358577474ab4 | |
| # @link http://tech.zumba.com/2014/04/14/control-code-quality/ | |
| PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
| STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
| # Determine if a file list is passed |
This file contains hidden or 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/local/bin/php | |
| <?php | |
| # PHP LINTING | |
| $output = array(); | |
| $return = 0; | |
| exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return); | |
| $against = $return == 0 ? 'HEAD' : '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; | |
| exec("git diff-index --diff-filter=ACMRTUXB --cached --name-only {$against}", $output); |
This file contains hidden or 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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
OlderNewer