Skip to content

Instantly share code, notes, and snippets.

View arturhoo's full-sized avatar

Artur Rodrigues arturhoo

View GitHub Profile
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
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 26, 2024 17:59
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
###
###
@vasanthk
vasanthk / System Design.md
Last active May 4, 2024 08:51
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?
@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

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