Skip to content

Instantly share code, notes, and snippets.

View RichardBronosky's full-sized avatar

Bruno Bronosky RichardBronosky

View GitHub Profile
@RichardBronosky
RichardBronosky / multiple_ssh_setting.md
Last active May 13, 2023 09:28 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
// number to string, pluginized from http://stackoverflow.com/questions/5529934/javascript-numbers-to-words
window.num2str = function (num) {
return window.num2str.convert(num);
}
window.num2str.ones=['','one','two','three','four','five','six','seven','eight','nine'];
window.num2str.tens=['','','twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety'];
window.num2str.teens=['ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'];
[
{
"Top News": {
"feeds": [
"/api/content/v1/manuallist/5847/?format=json",
"/api/content/v1/automaticlist/9121/?format=json"
]
}
},
{
@RichardBronosky
RichardBronosky / *scratch*
Created September 19, 2011 14:12 — forked from bigjust/*scratch*
Cut the BS. Get developing.
# Launch screen/tmux. Start this in the background while you try your other fixes. See which works first.
# Skip this if you want to try to fix your current venv
create_environment; sv; load_prod_db; django-admin.py loaddata local_site_list
# In case your jellydoughnut wasn't totally up to date
ensure_ro_db_user
# Migration Whack-a-Mole
django-admin.py migrate sitesettings
@RichardBronosky
RichardBronosky / jquery.selectOptgroup.js
Created May 12, 2011 05:07 — forked from SmileyChris/jquery.selectOptgroup.js
Convert select boxes with optgroup elements into multiple select boxes. Registers itself as an onReady handler.
(function(jQuery) {
// adapted from the work of Chris Beaven https://gist.github.com/967775
jQuery.fn.selectOptgroup = function(options) {
var settings = jQuery.extend({
optSelect: '_options',
inBetween: '',
optBlank: null,
selectBlank: null,
keepOrphans: true,
showSpeed: 200
function parse_git_branch {
local DIRTY=""
git diff --quiet HEAD &>/dev/null
case $? in
129)
# not a git repo, don't waste a second git command
return $?
;;
1)
DIRTY="⚡"