Skip to content

Instantly share code, notes, and snippets.

View drnic's full-sized avatar
🏆
Platinum Status Level

Dr Nic Williams drnic

🏆
Platinum Status Level
View GitHub Profile
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
# Must have conda installed
# It costs approximately $0.2 (in GPT-4 API fees) to generate one example with analysis and design, and around $2.0 for a full project.
conda create -n metagpt python=3.11.4
conda activate metagpt
npm --version # to check you have npm installed
# optional: install node if you don't have it
npm install -g @mermaid-js/mermaid-cli
git clone https://github.com/geekan/metagpt
cd metagpt
@KoryNunn
KoryNunn / handshake-airdrop.md
Last active March 12, 2024 07:03
Handshake airdrop for github users.

Had 15 github followers in 2019? You can get about $4kAUD of crypto for minimal effort.

Explain this scam

That's legitimately a good default position to hold, however, in this case, the free money is a function of time, and not only charity.

In February 2020, in order to promote Handshake (HNS) to developers, an airdrop was offered to any Github user with more than 15 followers. The Airdrop would give you 4246HNS, at the time worth around at $0.08USD per coin, for a total of $339.68USD, pretty generous!

Today, 4246HNS is worth around $4000 dollarydoos, and there are plenty of github users who haven't claimed theirs.

@Amit-PivotalLabs
Amit-PivotalLabs / bosh-links-why-and-how.md
Last active December 10, 2021 21:33
BOSH Links: Why and How
@anynines-gist
anynines-gist / bosh_sql_snippet
Last active May 29, 2019 12:05
Use Bosh to manually change the IP of your Cloud Foundry domains for a second deployment
# First insert the domains to the powerdns database used by bosh
insert into domains(name,type) values('a9s.eu','NATIVE');
insert into domains(name,type) values('a9sapp.eu','NATIVE');
# Then insert the required dns settings
# You need to replace the domain name and the domain_id. We're using *.de.a9s.eu as Cloud Foundry
# domain and *.de.a9sapp.eu as app domain.
insert into records(name,type,content,ttl,change_date,domain_id)
@dysinger
dysinger / easy-ubuntu-openvpn.sh
Created August 28, 2013 18:22
Create a VPN on EC2 in 30 seconds
#!/bin/sh
# linux firewall/forwarding
modprobe iptable_nat
echo 1 | tee /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.10.10.1/2 -o eth0 -j MASQUERADE
# install openvpn
apt-get update && apt-get install -y openvpn
cd /etc/openvpn/
INSTANCE=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
openvpn --genkey --secret ${INSTANCE}.key
@drnic
drnic / convert-to-credhub.sh
Last active December 20, 2017 11:09
Convert a ci/settings.yml with `(( vault "/secret/mything" ))` into concourse cred mgmt + a credhub import file
#!/bin/bash
cd ${1:?USAGE: convert-to-credhub.sh path/to/ci}
function indent() {
c='s/^/ /'
case $(uname) in
Darwin) sed -l "$c";;
*) sed -u "$c";;
esac
@drnic
drnic / github_user_collaborations.rb
Created July 13, 2010 10:30
Discover the contribution status of a user for all their watched repos: owner, collaborator, or watcher
#!/usr/bin/env ruby
#
# Discover the contribution status of a user for all their watched repos: owner, collaborator, or watcher
# Returns either JSON (default) or HTML (example http://github-user-profiles-example.heroku.com/)
#
# JSON: Returns either Array of JSON; or streams each JSON result as discovered (--stream flag)
# { "repo" => { ... }, "owner" => is project owner?, "collaborator" => has collaborator access? }
#
# HTML: Sort-of pretty HTML output. Nice to use --stream | bcat.
#
@rkoster
rkoster / migrate_blobs.sh
Last active December 18, 2015 01:39
Script for migrating blobs from one blob store to an other. This script expects a config/private.tmp.yml file which will be renamed to config/private.yml when blobs are downloaded. The contents for the new config/final.yml are hardcoded into the script. You should fill in your own target blobstore credentials
#!/bin/sh
# reset stuff
sudo rm -r .blobs
rm -r blobs
rm -r blobs_import
git checkout -- config/blobs.yml
git checkout -- config/final.yml
rm config/private.yml
@adamhjk
adamhjk / Guardfile
Last active December 17, 2015 03:19
A Guardfile with inline support for test-kitchen, before we turn it into a gem.
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
require 'guard/guard'
require 'mixlib/shellout'
module ::Guard
class Kitchen < ::Guard::Guard
def start
::Guard::UI.info("Guard::Kitchen is starting")