Skip to content

Instantly share code, notes, and snippets.

View 0foo's full-sized avatar

0foo 0foo

  • Earth
View GitHub Profile
@0foo
0foo / update-bash-macos.sh
Last active April 10, 2022 20:58 — forked from AshKyd/update-bash-macos.sh
Update MacOS bash & set default shell
brew install bash
* do a `brew --prefix bash` to find out where bash is installed
* create a symlink from there into /usr/local/bin/bash
sudo echo /usr/local/bin/bash >> /etc/shells
chsh -s /usr/local/bin/bash
@0foo
0foo / github_multiple-accounts.md
Created October 21, 2020 22:20 — forked from JoaquimLey/github_multiple-accounts.md
How to Work with GitHub and Multiple Accounts

Step 1 - Create a New SSH Key

We need to generate a unique SSH key for our second GitHub account.

ssh-keygen -t rsa -C "your-email-address"

Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_work.

Step 2 - Attach the New Key

@0foo
0foo / github_multiple-accounts.md
Created October 21, 2020 22:20 — forked from JoaquimLey/github_multiple-accounts.md
How to Work with GitHub and Multiple Accounts

Step 1 - Create a New SSH Key

We need to generate a unique SSH key for our second GitHub account.

ssh-keygen -t rsa -C "your-email-address"

Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_work.

Step 2 - Attach the New Key

Rank Type Prefix/Suffix
1. Prefix my+
2. Suffix +online
3. Prefix the+
4. Suffix +web
5. Suffix +media
6. Prefix web+
7. Suffix +world
8. Suffix +net
9. Prefix go+
print "BEFORE locals object count:", len(locals())
try:
locals_sum = 0
for i in locals().iteritems():
locals_sum += asizeof.asizeof(i)
# print asizeof.asizeof(i), i
print " sum of objects:", locals_sum
except:
pass
print "BEFORE globals object count:", len(globals())
@0foo
0foo / all_aws_managed_policies.json
Created February 14, 2019 04:35 — forked from gene1wood/all_aws_managed_policies.json
A list of all AWS managed policies and they're policy documents as well as a short script to generate the list
{
"APIGatewayServiceRolePolicy": {
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy",
"AttachmentCount": 1,
"CreateDate": "2018-08-10T17:57:44+00:00",
"DefaultVersionId": "v3",
"Document": {
"Statement": [
{
"Action": [
Data Hoarding General /dhg/ (sauce - https://github.com/simon987/awesome-datahoarding)
### Web Archiving
* Collect - https://github.com/xarantolus/Collect: A server to collect & archive websites that also supports video downloads
* grab-site - https://github.com/ludios/grab-site: The archivist's web crawler: WARC output, dashboard for all crawls, dynamic ignore patterns
* Heritrix - https://github.com/internetarchive/heritrix3: Extensible, web-scale, archival-quality web crawler
* HTTrack - https://www.httrack.com/: Download a website from the Internet to a local directory
* wail - https://github.com/machawk1/wail: Web Archiving Integration Layer: One-Click User Instigated Preservation
* wikiteam - https://github.com/WikiTeam/wikiteam: set of tools for archiving wikis
@0foo
0foo / gist:277bbacde4b95c93658b
Created January 25, 2016 16:11 — forked from hpjaj/gist:ef5ba70a938a963332d0
RSpec - List of available Expectation Matchers - from Lynda.com course 'RSpec Testing Framework with Ruby'
## From Lynda.com course 'RSpec Testing Framework with Ruby'
describe 'Expectation Matchers' do
describe 'equivalence matchers' do
it 'will match loose equality with #eq' do
a = "2 cats"
b = "2 cats"
expect(a).to eq(b)