Skip to content

Instantly share code, notes, and snippets.

@NoelFB
NoelFB / routine.h
Last active November 7, 2022 07:19
Simple C++ Coroutine using a switch statement internally
#pragma once
namespace YourNamespace
{
struct Routine
{
// Current "waiting time" before we run the next block
float wait_for = 0;
// Used during `rt_for`, which repeats the given block for X time
@briandeheus
briandeheus / spark.js
Created April 1, 2020 09:18
Sparkchart for React
const Spark = ({
height = 20,
width = 140,
series = [],
color = "#4CAF50",
backgroundColor = "#37474F",
radius = 3,
padding = [4, 4]
}) => {
const max = series.reduce((p, c) => {
@adriancmiranda
adriancmiranda / displacement-scroll.markdown
Created September 14, 2019 20:14
Displacement Scroll
@stevemoser
stevemoser / IncompatibleAppsList.plist
Created June 20, 2019 19:38
List of 235 apps incompatible with macOS Catalina 10.15
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IncompatiblePaths</key>
<array>
<dict>
<key>Application Name</key>
<string>Sxs Memory Card Driver</string>
<key>Blurb</key>
@briandeheus
briandeheus / parcel-react.sh
Created March 6, 2019 08:49
Parcel + React + Sass setup script
#!/bin/bash
package_json='
{
"name": "frontend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@briandeheus
briandeheus / useragents.txt
Created December 1, 2017 03:59
9400+ User Agents!
Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
Mozilla/5.0 (compatible; ABrowse 0.4; Syllable)
Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729)
Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser; GTB5; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.1; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SV1; Acoo Browser; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Avant Browser)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; GTB5; Mozilla/4.0 (comp
@briandeheus
briandeheus / message_queue.py
Created September 5, 2017 14:09
Distributed Message Queue in Python
from redis import Redis
import time
redis = Redis()
def work_from_queue(queue):
while True:
res = redis.rpop(queue)

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

@briandeheus
briandeheus / punk.py
Last active April 1, 2022 02:53
Don't be a punk, punk
import binascii
import struct
class Punk(object):
_END_CHUNK_TYPE = 'IEND'
_PUNK_CHUNK_TYPE = 'puNk'
_MAX_BYTES = 2147483647
_chunks = dict()