Skip to content

Instantly share code, notes, and snippets.

View kevmo's full-sized avatar
🔭

kevin moore kevmo

🔭
View GitHub Profile
@kevmo
kevmo / gist:6532611
Created September 12, 2013 02:57
Khaaaaan! Status Code 500. No servers available.
~/Desktop/spreadit: jitsu deploy --debug
info: Welcome to Nodejitsu kevmo
info: jitsu v0.13.2, node v0.10.15
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in make start
debug: { method: 'GET',
debug: uri: 'https://api.nodejitsu.com/apps/kevmo/mean',
debug: headers:
debug: { Authorization: '*************************************************************',
@kevmo
kevmo / gist:6532626
Created September 12, 2013 03:02
Error: Cannot find module '/opt/run/snapshot/package/make'
~/Desktop/spreadit: jitsu deploy --debug
info: Welcome to Nodejitsu kevmo
info: jitsu v0.13.2, node v0.10.15
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in make start
debug: { method: 'GET',
debug: uri: 'https://api.nodejitsu.com/apps/kevmo/mean',
debug: headers:
debug: { Authorization: '*************************************************************',
<!doctype html>
<html>
<head>
<style>
.hidden { display: none; }
#dead-drop { height: 200px; width: 200px; border: 1px solid #333; }
</style>
</head>
<body>
<form enctype="multipart/form-data" action="#" method="post">
@kevmo
kevmo / gist:513b5d34c8ed74e44334
Created December 12, 2014 20:54
Scrape a page for images using BeautifulSoup
import sys
import urllib2
import contextlib
from bs4 import BeautifulSoup
if len(sys.argv) < 2:
print 'Error: Please provide a URL to scrape.'
sys.exit(1)
@kevmo
kevmo / README.md
Created October 26, 2015 21:49
fresh block
Vagrant.configure(2) do |config|
config.vm.define "webserver" do |webserver|
webserver.vm.box = "ubuntu/trusty64"
webserver.vm.network "private_network", ip: "192.168.0.2"
webserver.vm.hostname = "webserver"
end
config.vm.define "ansible" do |ansible|
ansible.vm.box = "ubuntu/trusty64"
@kevmo
kevmo / Vagrantfile
Last active December 2, 2015 04:54
bootstrap.sh file for Vagrantfile provisioning CentOS env for Node Express app
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@kevmo
kevmo / yum_build-essential.sh
Created December 3, 2015 02:09
Installing build-essential on yum
sudo yum install -y libxml2 libxml2-devel libxslt libxslt-devel
@kevmo
kevmo / Vagrantfile
Created December 4, 2015 14:14
Using an ansible master machine
Vagrant.configure(2) do |config|
config.vm.define "webserver" do |webserver|
webserver.vm.box = "bento/centos-7.1"
webserver.vm.network "private_network", ip: "192.168.0.2"
webserver.vm.hostname = "webserver"
end
config.vm.define "ansible" do |ansible|
webserver.vm.box = "bento/centos-7.1"
webserver.vm.network "private_network", ip: "192.168.0.254"
@kevmo
kevmo / postgres-cheatsheet.md
Last active December 9, 2015 19:15 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

Magic words:

sudo -su postgres
psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

  • \q: Quit/Exit