Skip to content

Instantly share code, notes, and snippets.

@dreness
dreness / add_fork_remote.sh
Last active April 24, 2024 10:31
Use gh cli and fzf to add a remote for a fork of the current repo
#!/bin/sh
# Scenario:
# - you have a local checkout of a github repo
# - you're looking at public forks of that repo
# - you want to add a remote to your local checkout for one of the forks
set -e
set PIPEFAIL
@rxaviers
rxaviers / gist:7360908
Last active April 24, 2024 10:27
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@syrte
syrte / arcs.py
Last active April 24, 2024 10:27
Plot a collection of patches (circles, ellipses, rectangles), similar to `plt.scatter` but the size of patches are in data unit.
from __future__ import division, print_function, absolute_import
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Arc
from matplotlib.collections import PatchCollection
__all__ = ['arcs']
def arcs(x, y, w, h=None, rot=0.0, theta1=0.0, theta2=360.0,
c='b', vmin=None, vmax=None, **kwargs):
@Esonhugh
Esonhugh / aws_auto_assume.sh
Created April 24, 2024 10:05
automatically assume role with aws cli
# automatically set the AWS environment variables from the json output of `aws sts assume-role`
aws_sts_env () {
if [[ -z "$1" ]]
then
echo "Usage: $0 \`json\`"
echo "Example: export cred=\`aws sts assume-role --role-arn xxxx --role-session-name xxxx|jq ".Credentials"\`"
echo " aws_sts_env \$cred"
return
fi
export AWS_ACCESS_KEY_ID=`echo $1|jq -r '.AccessKeyId' `
@tbrianjones
tbrianjones / free_email_provider_domains.txt
Last active April 24, 2024 10:24
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@bszwej
bszwej / echo.js
Last active April 24, 2024 10:23
Pure Node.js echo server, that logs all incoming http requests (method, path, headers, body).
const http = require('http');
const server = http.createServer();
server.on('request', (request, response) => {
let body = [];
request.on('data', (chunk) => {
body.push(chunk);
}).on('end', () => {
body = Buffer.concat(body).toString();
@harlow
harlow / golang_job_queue.md
Last active April 24, 2024 10:21
Job queues in Golang

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 24, 2024 10:18
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)