Skip to content

Instantly share code, notes, and snippets.

View apolloclark's full-sized avatar
💭
automating the world

Apollo Clark apolloclark

💭
automating the world
View GitHub Profile
<VirtualHost *>
WSGIApplicationGroup %{GLOBAL}
# Setup Python for the App1
WSGIDaemonProcess app1 user=www-data group=www-data threads=5
WSGIScriptAlias /app1 /var/www/app1/app1.wsgi
<Directory /var/www/app1>
Order deny,allow
Allow from all
# required distro packages
sudo apt-get -y install nmap curl libcurl3-dev rbenv libyaml-dev libxml2-dev libxslt-dev ruby1.9.1-dev
# Install Gauntlt
sudo gem install gauntlt
# install XMLLint, tidy
# @see http://datascienceatthecommandline.com/
sudo apt-get install -y libxml2-utils tidy
@apolloclark
apolloclark / postgres cheatsheet.md
Last active November 15, 2024 05:23
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@apolloclark
apolloclark / virtualbox cheatsheet
Last active February 19, 2016 15:50
Virtualbox Commands
# add video mode
VBoxManage setextradata "VM_NAME" "CustomVideoMode1" "1280x720x32"
# set video mode
VBoxManage controlvm "VM_NAME" setvideomodehint 1280 720 32
@apolloclark
apolloclark / Kali 2016.1, Railsgoat Install script
Last active July 20, 2016 13:39
Kali 2016.1, Railsgoat install
#!/bin/bash
# @see https://gorails.com/setup/ubuntu/15.10
# update, install git
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
sudo apt-get install -y git-core build-essential libssl-dev libreadline-dev \
libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev \
libcurl4-openssl-dev python-software-properties libffi-dev zlib1g-dev
@apolloclark
apolloclark / apt-get cheatsheet
Last active November 19, 2023 13:13
APT cheatsheet
# list repos
sudo apt-cache policy
# add repo
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ saucy universe multiverse"
# remove repo
sudo add-apt-repository --remove <ppa:whatever/ppa>
# list package version available
pip install --no-deps --no-install <package_name> -v
@apolloclark
apolloclark / Twitter API with Curl
Last active December 15, 2024 00:46
Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"