Skip to content

Instantly share code, notes, and snippets.

View arturhoo's full-sized avatar

Artur Rodrigues arturhoo

View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active April 19, 2024 15:40
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 16, 2024 20:25
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 14, 2024 11:40
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
###
###
@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).
@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
}
@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.

@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
#
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]}
@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'
@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