Skip to content

Instantly share code, notes, and snippets.

View marianabocoi's full-sized avatar

Mariana B. (she/her/they/them) marianabocoi

View GitHub Profile
# Writeup of anything codered that is not in the README
#Week 1
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 26, 2024 15:51
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@kdabir
kdabir / homebrew_maintenance.md
Last active March 3, 2024 21:12
HomeBrew Maintenance (Mac OS X)

HomeBrew Maintenance

  • To list all the software/lib installed by brew $ brew list

  • to update an app $ brew upgrade appname

  • to see issues $ brew doctor

  • to update brew $ brew update

@pilate
pilate / DataTableToCSV.js
Created December 14, 2011 16:43
Convert instance of 'google.visualization.DataTable' to CSV
/**
* Convert an instance of google.visualization.DataTable to CSV
* @param {google.visualization.DataTable} dataTable_arg DataTable to convert
* @return {String} Converted CSV String
*/
function dataTableToCSV(dataTable_arg) {
var dt_cols = dataTable_arg.getNumberOfColumns();
var dt_rows = dataTable_arg.getNumberOfRows();
var csv_cols = [];
@textarcana
textarcana / git-log2json.sh
Last active March 1, 2024 05:26
Convert Git logs to JSON. The first script (git-log2json.sh) is all you need, the other two files contain only optional bonus features 😀THIS GIST NOW HAS A FULL GIT REPO: https://github.com/context-driven-testing-toolkit/git-log2json
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'