Skip to content

Instantly share code, notes, and snippets.

@HereComesJuju
HereComesJuju / multiple_ssh_setting.md
Created November 4, 2022 12:58 — 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"

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@HereComesJuju
HereComesJuju / docker-aliases.sh
Created December 28, 2020 17:40 — forked from jgrodziski/docker-aliases.sh
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@HereComesJuju
HereComesJuju / postgres_queries_and_commands.sql
Created November 12, 2020 14:28 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@HereComesJuju
HereComesJuju / .hyper.js
Last active February 13, 2020 14:15
Hyper term settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@HereComesJuju
HereComesJuju / basket.ts
Created September 13, 2019 19:12 — forked from mrcrowl/basket.ts
Example of using vuex-type to create strongly-typed vuex store access
// path: store/basket/basket.ts (module)
import { RootState } from "../../store"
import inventory, { Product } from "../inventory/inventory"
export interface Item { productId: string, quantity: number }
export interface DisplayItem { product: Product, quantity: number }
export interface BasketState { items: Item[], isLoading: boolean }
const initialBasketState: BasketState = { items: [], isLoading: false }
@HereComesJuju
HereComesJuju / .zshrc
Created September 4, 2019 10:04 — forked from ericdouglas/.zshrc
oh-my-zsh configs
# Path to your oh-my-zsh installation.
export ZSH=/home/ericdouglas/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
@HereComesJuju
HereComesJuju / walksync.js
Created July 23, 2019 14:00 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@HereComesJuju
HereComesJuju / Node.js File Looper
Created July 23, 2019 12:37 — forked from adamwdraper/Node.js File Looper
Loop through all files in a given directory with node.js
var fs = require('fs');
var walkPath = './';
var walk = function (dir, done) {
fs.readdir(dir, function (error, list) {
if (error) {
return done(error);
}
function RemoveAccents(strAccents) {
var strAccents = strAccents.split('');
var strAccentsOut = new Array();
var strAccentsLen = strAccents.length;
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž';
var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz";
for (var y = 0; y < strAccentsLen; y++) {
if (accents.indexOf(strAccents[y]) != -1) {
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1);
} else