Skip to content

Instantly share code, notes, and snippets.

Keith Fitzgerald ghostrocket

Block or report user

Report or block ghostrocket

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
@ghostrocket
ghostrocket / install-ffmpeg-amazon-linux.sh
Last active Jun 19, 2017 — forked from alfonsodev/install-ffmpeg-amazon-linux.sh
How to compile ffmpeg on Amazon Linux (EC2)
View install-ffmpeg-amazon-linux.sh
#!/bin/sh
# Based on gist.github.com/gboudreau/install-ffmpeg-amazon-linux.sh
# and https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@ghostrocket
ghostrocket / using-aws-kms.php
Created Dec 22, 2016 — forked from lysender/using-aws-kms.php
Using AWS KMS API via PHP SDK
View using-aws-kms.php
<?php
use Aws\Kms\KmsClient;
// Somewhere in the controller or model
$this->load->config('aws');
// Not needed for EC2 instance role based authorization - for my local instance only
$key = $this->config->item('aws_s3_access_key');
$secret = $this->config->item('aws_s3_secret_key');
View gist:9fc0c7cca20de0f9d5cdb27bff69d386
Verifying that "ghostrocket.id" is my Blockstack ID. https://onename.com/ghostrocket
View gist:4a4b291092a7eb37f99c
# put this file in /usr/local/etc/my.cnf
[mysqld]
max_connections = 10
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
View ghostrocket-mou
editor
foreground: f5f5f5
background: 000000
caret: 000000
editor-selection
foreground: ffffff
background: ff4f92
H1
View fix-python-mavericks
#!/bin/bash
# install setuptools
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python
# install pip
sudo easy_install pip
# install virtualenv
sudo pip install virtualenv
@ghostrocket
ghostrocket / gist:6581566
Created Sep 16, 2013
Fix Busted Characters after converting mysql db from latin1_swedish to utf8
View gist:6581566
mysql -uroot --password= --skip-column-names -e "select concat('update ', a.table_name, ' set ', a.column_name, ' = convert(cast(convert(', a.column_name, ' using latin1) as binary) using utf8);') from information_schema.columns a where a.table_schema = '$DB_SCHEMA';" > fixutf8.sql
mysql -uroot --password= $DB_SCHEMA < fixutf8.sql
@ghostrocket
ghostrocket / gist:2208270
Created Mar 26, 2012 — forked from shripadk/gist:652819
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
View gist:2208270
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
View a-backbone-js-demo-app-sinatra-backend.md

A Backbone.js demo app (Sinatra Backend)

Oct 16 2010

Updates

  • 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments

In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].

View site-packages
python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
You can’t perform that action at this time.