Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# A sample Gemfile | |
source "http://rubygems.org" | |
gem "redis" | |
gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git' | |
gem "em-hiredis" | |
# gem "em-synchrony" | |
gem "em-websocket" |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
require 'rubygems' | |
require 'open-uri' | |
require 'yajl' | |
require 'redis' | |
realm = "Lothar" | |
filePath = Yajl::Parser.parse(open("http://us.battle.net/api/wow/auction/data/#{realm}"))["files"].first['url'] | |
puts filePath | |
redis = Redis.new |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# Install Git needed for Git based gems | |
packages: | |
yum: | |
git: [] | |
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
-- phpMyAdmin SQL Dump | |
-- version 4.2.7.1 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Dec 12, 2014 at 07:20 PM | |
-- Server version: 5.6.20 | |
-- PHP Version: 5.5.15 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
<!-- General Settings --> | |
<advancedsettings> | |
<loglevel hide="true">-1</loglevel> <!-- Comment: Disables logging --> | |
<playcountminimumpercent>95</playcountminimumpercent> | |
<skiploopfilter>0</skiploopfilter> <!-- Comment: For RPi or similar use 16 or higher (low CPU usage) --> | |
<nodvdrom>true</nodvdrom> | |
<!-- MySQL Library --> | |
<videodatabase> | |
<type>mysql</type> |
var async = require("async"); | |
var AWS = require("aws-sdk"); | |
var gm = require("gm").subClass({imageMagick: true}); | |
var fs = require("fs"); | |
var mktemp = require("mktemp"); | |
var THUMB_KEY_PREFIX = "thumbnails/", | |
THUMB_WIDTH = 150, | |
THUMB_HEIGHT = 150, | |
ALLOWED_FILETYPES = ['png', 'jpg', 'jpeg', 'bmp', 'tiff', 'pdf', 'gif']; |