Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@dbtek
dbtek / venv_wrapper
Last active March 17, 2024 05:21
Python 3 venv wrapper. Manages all virtual environments under ~/.venv/ .
# venv_wrapper, manage all virtual environments under ~/.venv/
# Include following in .bashrc / .bash_profile / .zshrc
# See https://gist.github.com/dbtek/fb2ddccb18f0cf63a654ea2cc94c8f19
# Usage
# $ mkvenv myvirtualenv # creates venv under ~/.venv/
# $ venv myvirtualenv # activates venv
# $ deactivate # deactivates venv
# $ rmvenv myvirtualenv # removes venv
export VENV_HOME="$HOME/.venv"
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@andreibosco
andreibosco / creative-cloud-disable.md
Last active January 3, 2024 02:37
disable creative cloud startup on mac
@ipbastola
ipbastola / jq to filter by value.md
Last active April 12, 2024 05:36
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@Ryanb58
Ryanb58 / ftps_list_dir.py
Last active February 16, 2023 11:03
Quick script to connect to a FTPS server via python.
# WOrks in python 2.7 not sure if it works in python 3.
# Just straight up connect by any means possible.
from ftplib import FTP_TLS
def connect():
ftp = FTP_TLS()
ftp.debugging = 2
ftp.connect('localhost', 2121)
ftp.login('developer', 'password')
@fideloper
fideloper / update_curl.sh
Last active January 11, 2024 15:23
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@lmarkus
lmarkus / README.MD
Last active March 27, 2024 07:15
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@grantland
grantland / AGB-001_Light_Mod.md
Last active January 25, 2023 15:12
AGB-001 Front/Backlight Mod Instructions

AGB-001 Front/Backlight Mod Instructions

AGB-001 Backlight Mod

Requirements

  • AGB-001
  • ASS101 screen
@karpathy
karpathy / min-char-rnn.py
Last active April 21, 2024 00:57
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)