Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
Crunching code

Kirtan Gajjar kirtangajjar

😎
Crunching code
View GitHub Profile
@tomjn
tomjn / tomjn_http2_push.php
Created Jan 25, 2019
A naive and incomplete, but functional approach to http2 push
View tomjn_http2_push.php
<?php
/**
* Plugin name: HTTP2 Push scripts
* Author: Tom J Nowell
*/
function tomjn_get_dep_url( /*\WP_Dependency*/ $dep ) {
global $wp_version;
$relative = str_replace( site_url(), '', $dep->src );
$ver = $dep->ver;
@korakot
korakot / record.py
Last active Apr 3, 2021
Record audio in Colab using getUserMedia({ audio: true })
View record.py
# all imports
from IPython.display import Javascript
from google.colab import output
from base64 import b64decode
from io import BytesIO
!pip -q install pydub
from pydub import AudioSegment
RECORD = """
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
@janlelis
janlelis / emoji-variations.md
Last active Mar 5, 2019
Emoji Variations and Names
View emoji-variations.md

See character.construction/emoji-vs-text for more up-to-date listings.

Emoji Variations and Names (Emoji 11.0 / Unicode 11.0.0)

Text (U+FE0E) Default Emoji (U+FE0F) Name
😀︎ 😀 😀️ GRINNING FACE
😁︎ 😁 😁️ GRINNING FACE WITH SMILING EYES
😂︎ 😂 😂️ FACE WITH TEARS OF JOY
🤣︎ 🤣 🤣️ ROLLING ON THE FLOOR LAUGHING
@VictorLaskin
VictorLaskin / fn_universal.cpp
Last active Apr 16, 2020
Templates as first-class citizens in C++11
View fn_universal.cpp
// Templates as first-class citizens in C++11
// Example code from http://vitiy.info/templates-as-first-class-citizens-in-cpp11/
// Written by Victor Laskin (victor.laskin@gmail.com)
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <tuple>
@VictorLaskin
VictorLaskin / listcompr.cpp
Created Feb 16, 2015
C++11: Implementation of list comprehension in SQL-like form
View listcompr.cpp
// List comprehension in C++11 in form of SQL-like syntax
// Example code from http://vitiy.info/cpp11-writing-list-comprehension-in-form-of-sql/
// Written by Victor Laskin (victor.laskin@gmail.com)
#include <iostream>
#include <functional>
#include <vector>
#include <future>
#include <algorithm>
using namespace std;
@Tehnix
Tehnix / brew-up-system.sh
Last active Mar 9, 2021
Set up OS X with brew
View brew-up-system.sh
#!/bin/sh
binaries=(
awscli
trash
tree
git
mosh
tmux
screen
zsh
@staltz
staltz / introrx.md
Last active May 10, 2021
The introduction to Reactive Programming you've been missing
View introrx.md