Skip to content

Instantly share code, notes, and snippets.


Vikrum vikrum

Block or report user

Report or block vikrum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Treeki / TurnipPrices.cpp
Last active Apr 10, 2020
AC:NH turnip price calculator
View TurnipPrices.cpp
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from
namespace sead
class Random
paceaux / queryCSSProperty
Last active Jun 30, 2019
Get all CSS selectors containing a particular CSS property
View queryCSSProperty
/** queryCSSByPropertyName
* queries the CSSOM looking for CSS rulesets containing a particular CSS property.
* @param {string} queryPropName CSS property name
* @param {string} queryPropValue value of CSS property
* @returns Map with key as CSS selector, value as CSS properties.
function queryCSSByProperty(queryPropName, queryPropValue) {
const styleSheets= document.styleSheets; // get all the stylesheets
const properties = new Map(); // set up the variable that'll store our result
nlitsme /
Created Dec 14, 2017 for older bash versions - from magnet:?xt=urn:btih:7ffbcd8cee06aba2ce6561688cf68ce2addca0a3
# from BreachCompilation - magnet:?xt=urn:btih:7ffbcd8cee06aba2ce6561688cf68ce2addca0a3
# works with older bash versions.
# patch by Willem <>
dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ "$1" != "" ]; then
word1=$(echo $1 | tr A-Z a-z)
letter1=$(echo $word1|cut -b1)
if [[ $letter1 == [a-zA-Z0-9] ]]; then

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
jeremybuis /
Created Jan 27, 2016
Angular Sandbox Escape Cheatsheet
// Based on java example:
// save as:
// compile using JDK: javac
// run: java URLConnectionReader
// good path: returns HTML
// bad path: throws an exception
nocturnalgeek / MailinatorAliases
Last active Mar 28, 2020
A list of alternate domains that point to
View MailinatorAliases
View alert.js
alert('hello ' + document.location.href);
View UIImage+Snapshot.m
+ (UIImage *)snapshotView:(UIView *)view {
UIGraphicsBeginImageContextWithOptions(view.frame.size, NO, [[UIScreen mainScreen] scale]); //0
[view drawViewHierarchyInRect:view.frame afterScreenUpdates:YES];
UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext();
return snapshot;
+ (UIImage *)snapshot {
CGSize imageSize = CGSizeZero;
jboner / latency.txt
Last active Apr 10, 2020
Latency Numbers Every Programmer Should Know
View latency.txt
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
You can’t perform that action at this time.