Skip to content

Instantly share code, notes, and snippets.

View ellisio's full-sized avatar
:octocat:
Go Avs!

Andrew Ellis ellisio

:octocat:
Go Avs!
View GitHub Profile
@ellisio
ellisio / a.rb
Created February 18, 2015 20:14
https://gist.github.com/c0f1653f6e9d522c316f
@ellisio
ellisio / redis.sh
Created December 11, 2014 18:08
An init.d script for Redis on CentOS 6.
#!/bin/sh
# http://vm-192-168-11-21.shengyun.grandcloud.cn/topics/2437
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@ellisio
ellisio / supervisor.sh
Created December 11, 2014 18:04
An init.d script for supervisord
#!/bin/sh
#
# /etc/rc.d/init.d/supervisor
#
# Supervisor is a client/server system that
# allows its users to monitor and control a
# number of processes on UNIX-like operating
# systems.
#
# chkconfig: 345 83 04
##
44 # VAGRANTFILE
45 # -----------
46 #
47 # DO NOT EDIT ANY OF THIS OR YOU WILL BE EATEN BY AN EVIL DRAGON!
48 #
49 =begin
50 .~))>>
51 .~)>>
52 .~))))>>>
# Settings
lang en_US.UTF-8
keyboard us
rootpw vagrant
authconfig --enableshadow --enablemd5
timezone UTC
# Pre-install
install
cdrom
@ellisio
ellisio / scrape.sh
Created June 4, 2014 20:54
Scan for iTunes album art sizes.
#!/bin/bash
rm -rf images
mkdir images
for i in {1..1024}
do
for x in {1..100}
do
echo "Checking ${i}x${i}-${x}"
<?php
class Date {
/**
* Convert a local timestamp to a GMT timestamp.
*
* @static
*
* @param string $timestamp
* @param string $timezone
* @param string $format
@ellisio
ellisio / Homebrew PHP 5.3.10
Created February 2, 2012 23:20
Homebrew PHP 5.3.10
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
def postgres_installed?
`which pg_config`.length > 0
end
<html>
<head>
<title>Test</title>
</head>
<body>
<div id="object">
<div class="box"></div>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript">
apt-get install ssh