Skip to content

Instantly share code, notes, and snippets.

View d8aninja's full-sized avatar
🐙

Jeff d8aninja

🐙
View GitHub Profile
@d8aninja
d8aninja / django_ami.md
Created March 15, 2022 14:31 — forked from aderowbotham/django_ami.md
Django stack setup on EC2 AMI

Django Stack

Overview

This is a set of instructions to setup a Django Nginx Gunicorn MySQL/Postgres stack on a single Amazon EC2 instance.

Server - AWS

@jeshan
jeshan / cdk-profile-plugin.js
Last active April 28, 2022 20:01
How to select AWS profiles per account in AWS CDK
const { CredentialProviderChain } = require('aws-sdk');
const AWS = require('aws-sdk');
const accountProvider = require('./account-provider');
let getEnv = function(accountId) {
// TODO: insert logic to get your desired profile name
return profileName;
};
let getProvider = async (accountId, mode) => {
@edmundsmith
edmundsmith / writeup.md
Created July 7, 2019 20:47
Method for Emulating Higher-Kinded Types in Rust

Method for Emulating Higher-Kinded Types in Rust

Intro

I've been fiddling about with an idea lately, looking at how higher-kinded types can be represented in such a way that we can reason with them in Rust here and now, without having to wait a couple years for what would be a significant change to the language and compiler.

There have been multiple discussions on introducing higher-ranked polymorphism into Rust, using Haskell-style Higher-Kinded Types (HKTs) or Scala-looking Generalised Associated Types (GATs). The benefit of higher-ranked polymorphism is to allow higher-level, richer abstractions and pattern expression than just the rank-1 polymorphism we have today.

As an example, currently we can express this type:

@d8aninja
d8aninja / README.md
Created May 27, 2018 22:48 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@nobitagit
nobitagit / iterm2.md
Last active August 24, 2023 12:16
iterm2 cheatsheet

This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
@olih
olih / jq-cheetsheet.md
Last active May 15, 2024 22:26
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@hrbrmstr
hrbrmstr / orig.png
Last active July 16, 2023 06:43
Supreme Annotations - moar splainin here: http://rud.is/b/2016/03/16/supreme-annotations/ - NOTE: this requires the github version of ggplot2
orig.png
@kvz
kvz / Makefile
Last active August 28, 2021 14:35
The only Makefile for Node.js projects you'll ever need - https://twitter.com/kvz/status/685853830425231361
# Licensed under MIT.
# Copyright (2016) by Kevin van Zonneveld https://twitter.com/kvz
#
# This Makefile offers convience shortcuts into any Node.js project that utilizes npm scripts.
# It functions as a wrapper around the actual listed in `package.json`
# So instead of typing:
#
# $ npm script build:assets
#
# you could just as well type:
@dannguyen
dannguyen / wget-snapshotpage.md
Last active December 25, 2023 20:57
Use wget to snapshot a page and its necessary visual dependencies

Use wget to mirror a single page and its visible dependencies (images, styles)

Money graphic via State of Florida CFO Vendor Payment Search

Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)

This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.

@oaass
oaass / filedec.py
Last active August 9, 2021 08:36
Helper script to try many different openssl cipher algorithms against a file
#!/usr/bin/env python
import subprocess
import argparse
import os
import sys
def yesno(message_type, default = 'y'):
if message_type == 'DELETE_FILES_IN_FOLDER':
question = 'The folder is not empty. Do you want to delete the files in it?'