Skip to content

Instantly share code, notes, and snippets.

View kevinslin's full-sized avatar

Kevin Lin kevinslin

View GitHub Profile
@Maarrk
Maarrk / dendron-zotero.md
Last active March 9, 2023 19:13
Zotero items into dendron notes

Zotero items into dendron notes

See demo on imgur

Prerequisites

Ensure you have these:

  • Visual Studio Code
  • Dendron
@gene1wood
gene1wood / all_aws_managed_policies.json
Last active November 15, 2024 10:24
A list of all AWS managed policies and they're policy documents as well as a short script to generate the list
This file has been truncated, but you can view the full file.
{
"APIGatewayServiceRolePolicy": {
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy",
"AttachmentCount": 0,
"CreateDate": "2019-10-22T18:22:01+00:00",
"DefaultVersionId": "v6",
"Document": {
"Statement": [
{
"Action": [
@ainoya
ainoya / gist:4662125
Last active December 11, 2015 21:28
Avoiding pry installation failure by installing rdoc gem before install it.
➜ ~ rbenv global 1.9.3-p286
➜ ~ rbenv rehash
➜ ~ gem install pry
Fetching: coderay-1.0.8.gem (100%)
Fetching: slop-3.4.3.gem (100%)
Fetching: method_source-0.8.1.gem (100%)
Fetching: pry-0.9.11.4.gem (100%)
Successfully installed coderay-1.0.8
Successfully installed slop-3.4.3
Successfully installed method_source-0.8.1
@jboner
jboner / latency.txt
Last active November 17, 2024 11:32
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@nathanborror
nathanborror / xmltohtml.py
Created July 27, 2011 06:55
XML to HTML template rendering
from lxml import objectify
from django import template
from django.template.loader import render_to_string
register = template.Library()
class XMLNode(template.Node):
def __init__(self, xml):