Skip to content

Instantly share code, notes, and snippets.

View geekforbrains's full-sized avatar
🥸

Gavin Vickery geekforbrains

🥸
View GitHub Profile
@geekforbrains
geekforbrains / gist:8756361
Created February 1, 2014 18:27
Installing lxml via pip on Ubuntu
sudo apt-get update
sudo apt-get install libxml2
sudo apt-get install libxslt1.1
sudo apt-get install libxml2-dev
sudo apt-get install libxslt1-dev
sudo apt-get install python-libxml2
sudo apt-get install python-libxslt1
sudo apt-get install python-dev
sudo apt-get install python-setuptools
@geekforbrains
geekforbrains / consumer.js
Created April 3, 2014 20:13
ZeroMQ + Node.js Messaging Queue
var os = require('os');
var cluster = require('cluster');
var zmq = require('zmq');
if(cluster.isMaster) {
var cpuCount = os.cpus().length;
for(var i = 0; i < cpuCount; i++) cluster.fork();
} else {
var socket = zmq.socket('pull')
socket.identity = 'consumer' + process.pid;
@geekforbrains
geekforbrains / postachio_example
Last active August 29, 2015 13:59
Postach.io Dropbox Markdown Example Post
title: My First Post
date: 2014-04-15
tags: life, photos
type: post
This is my first post! Hooray!
@geekforbrains
geekforbrains / gist:c8a11d128f13d038b119
Created April 30, 2015 18:23
Using Meteor settings (settings.json) on Heroku
heroku config:add METEOR_SETTINGS="$(cat settings.json)"
@geekforbrains
geekforbrains / router.js
Last active August 29, 2015 14:22
Meteor router brainstorm
// Router with no optoins
SiteRouter = new Router();
SiteRouter.route('/', {name: 'site.index'});
SiteRouter.route('/page/:pageId', {
name: 'site.page', // automatically looks for a template named "site.page" and loads it
subs: Meteor.subscribe('pageById', this.params.pageId)
});
@geekforbrains
geekforbrains / youtube_shortcode_example
Created June 22, 2015 19:41
An example of a YouTube embed on Postach.io
[youtube url="http://www.youtube.com/watch?v=07ds8iv1XPM" width="480" height=“320"]
@geekforbrains
geekforbrains / nsscreencast_curl.sh
Created September 25, 2015 15:48
cURL request to NSScreencast login
curl -v https://www.nsscreencast.com/login
* Trying 162.243.42.159...
* Connected to www.nsscreencast.com (162.243.42.159) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
* Server certificate: www.nsscreencast.com
* Server certificate: COMODO RSA Domain Validation Secure Server CA
* Server certificate: COMODO RSA Certification Authority
* Server certificate: AddTrust External CA Root
> GET /login HTTP/1.1
> Host: www.nsscreencast.com
@geekforbrains
geekforbrains / disable_dashboard.sh
Created February 14, 2012 17:19
Disable Dashboard on your Mac
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
@geekforbrains
geekforbrains / countdown.css
Created October 5, 2015 16:32
Javascript countdown
#countdown {
position: absolute;
left: 50%;
top: 50%;
width: 100px;
height: 100px;
display: none;
margin: -50px 0 0 -50px;
border: 2px solid #cecece;
background-color: #fefefe;
@geekforbrains
geekforbrains / source.html
Created October 7, 2015 21:05
3, 2, 1 Go!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>3, 2, 1 - Go!</title>
<style>
#countdown {
position: absolute;
left: 50%;
top: 50%;