Skip to content

Instantly share code, notes, and snippets.

Ryan Gibbons rtgibbons

Block or report user

Report or block rtgibbons

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rtgibbons / logger.js
Created Apr 29, 2014
another winston logger helper
View logger.js
var winston = require('winston');
var logger = new(winston.Logger)({
transports: [
level: 'debug',
colorize: true,
timestamp: true
new winston.transports.File({
rtgibbons / userChrome.css
Created Apr 17, 2014
Using FF 29+ with Classic Theme Restorer Square Tabs (australized), updating bookmark bar to match
View userChrome.css
/* ----- BOOKMARK BUTTONS ----- */
#personal-bookmarks[cui-areatype="toolbar"]:not([overflowedItem=true]) > #bookmarks-toolbar-placeholder {
border: 0;
border-radius: 2.5px !important;
padding: 1px 8px !important;
margin: 0 0 1px;
font-weight: bold;
color: rgb(85, 85, 85);
rtgibbons / Dockerfile
Created Nov 8, 2013
Dockerfile for Ghost demo server on ubuntu 12.10
View Dockerfile
FROM ubuntu:12.10
# Install Node.js from Chris Lea's PPA to get v0.10.x
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get install -y nodejs
ADD . /var/www
rtgibbons / logger.js
Created Nov 7, 2013
Logger Library with winston
View logger.js
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',
rtgibbons / customimpactsnippet.php
Created Sep 23, 2013
custom impact mysql error
View customimpactsnippet.php
public function getTotalDonationImpactOfUserIds($user_ids_array){
$queryGZ = "SELECT SUM(amount) FROM gz_donations where ";
$queryMGF = "SELECT SUM(amount) FROM mgf_donations where ";
for ($i=0; $i<count($user_ids_array); $i++){
$id = $this->db->escape($user_ids_array[$i]);
if ($i == count($user_ids_array) - 1) {
$queryGZ = $queryGZ . "referrer_user_id ='$id' OR donated_by_user_id ='$id'";
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git:// /usr/local/rbenv
# Add rbenv to the path:
View Preferences.sublime-settings
"color_scheme": "Packages/Base16 Color Schemes/base16-eighties.dark.tmTheme",
"enable_telemetry": true,
"ensure_newline_at_eof_on_save": true,
"font_size": 12,
"git_command": "/opt/boxen/homebrew/bin/git",
rtgibbons / Package Control.sublime-settings
Created Jul 15, 2013
View Package Control.sublime-settings
"Base16 Color Schemes",
"Package Control",
rtgibbons / gist:5009517
Created Feb 21, 2013
grunt string-replace
View gist:5009517
'string-replace': {
optimized: {
files: {
'source/index.html': 'source/index.html'
options: {
replacements: [{
pattern: /static\/js\/main/,
replacement: 'static/js/main.optimized'
View gist:3504782
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{request_uri} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]
You can’t perform that action at this time.