Skip to content

Instantly share code, notes, and snippets.

View arturhoo's full-sized avatar

Artur Rodrigues arturhoo

View GitHub Profile
@yano3
yano3 / gist:4108957
Created November 19, 2012 04:26
brew upgrade mysql
$ brew upgrade mysql
Warning: Your Xcode (3.2.5) is outdated
Please install Xcode 3.2.6.
==> Upgrading mysql
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mysql-5.5.28.snowleopard.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mysql-5.5.28.snowleopard.bottle.tar.gz
==> Caveats
Set up databases to run AS YOUR USER ACCOUNT with:
unset TMPDIR

Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using Vagrant. This took me a while to figure out:

Add the default lucid32 base box to your vagrant, if you haven't already:

host> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box 

Now make a new lucid32 virtual machine and install postgresql on it:

@arturhoo
arturhoo / Easily Start and Stop EC2 Instances.md
Last active April 7, 2017 22:44
Ruby script to start and stop instances

How to use the script below

Requirements:

Two files are required: ~/.aws/config and a file containing instances ids, one per line, eg:

~/.aws/config

@kylemcdonald
kylemcdonald / pr-log.py
Last active August 18, 2018 23:06
Probe request MAC/SSID pair logging with tcpdump and Python3 for OS X, using airport for channel hopping.
import re
import pickle
from threading import Timer
import subprocess
from subprocess import call
import os.path
import sys
# config
database = 'allPairs.p'
r53 = AWS::Route53.new(
:access_key_id => 'aws-key-id',
:secret_access_key => 'aws-secret-key')
response = r53.client.list_resource_record_sets(
:hosted_zone_id => "zone-id",
:start_record_name => 'xxx.example.com',
:start_record_type => 'CNAME'
)
puts response[:resource_record_sets].map{|r| r[:name]}
@mattconnolly
mattconnolly / gist:4158961
Created November 28, 2012 04:04
RSpec basic authentication helper module for request and controller specs
module AuthHelper
def http_login
user = 'username'
pw = 'password'
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw)
end
end
module AuthRequestHelper
#
@keikubo
keikubo / README.md
Created March 20, 2012 01:38
Nginx + Unicorn for Rails on Rackhub

Nginx + Unicorn for Rails on Rackhub

Description:

This script enables you to launch your Rails application in production environment (port:80) with Nginx and Unicorn.

Installation:

Please make sure that your Gemfile in your rails application includes unicorn.

@IanVaughan
IanVaughan / uninstall_gems.sh
Created June 9, 2012 20:37
Uninstall all rbenv gems
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
@rodw
rodw / backup-github.sh
Last active March 30, 2024 15:04
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 23, 2024 06:15
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###