Skip to content

Instantly share code, notes, and snippets.

View 1-1-file-reverse.c
#define SIZE_4K 1024*4
int getFileSize(char * strFileName)
Script to offset the time in subtitle files in the .srt format. Script
takes in the filename and the offset (in milliseconds) to add or
subtract from the subtitles. It then writes the new subtitles to the
same file. Alternately you can specify the filename as '-' and then
the script will read input from stdin and write output to stdout.
View gist:1f59768085d5383e9e0e
// Generated by gfwlist2pac
var domains = {
// "": 1,
"": 1,
"": 1,
"" : 1,
"": 1,
"": 1,
import argparse
import fnmatch
import os
import string
import subprocess
import sys
from collections import defaultdict
#!/usr/bin/env python
import os
import zipfile
Helper class that lets one add whole directory contents.
View A better IndexedDB

--------- Work In progress ---------

##Context Multiple discussion threads spun out after this tweet mentioning my talk on Full-Text Search in IndexedDB using Inverted Indices at BerlinJS.

Only the beginning of my talk was about my discontent with the current IDB API and how it is a much needed technology. Unfortunately it's not terrific as a spec and has rather messy implementations across browsers. The API is way too low-level and needs a decent amount of abstraction for everyday web-developers to work with it.

Sharing my slides isn't going to be of much help, and neither is discussing about them in 140 chars.

lygstate / glfwAngle.cpp
Last active Jul 14, 2016
glfw with gis
View glfwAngle.cpp
#include <GLFW/glfw3.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#define esLogMessage printf
typedef struct
// Handle to a program object
GLuint programObject;
lygstate / gist:8262ecbef452dc668e30d40c5795bb06
Last active Dec 25, 2019
Full log of ld.lld 9.0.1 coredump for chromium 78 on alpine
View gist:8262ecbef452dc668e30d40c5795bb06
Undefined set logging command: "getTypeId.log". Try "help set logging".
Currently logging to "gdb.txt".
Future logs will be written to getTypeId.log.
Logs will be appended to the log file.
Output will be logged and displayed.
Thread 9 (LWP 254):
#0 0x000055f062d9fb2f in AddNodeIDCustom (ID=..., N=0x55f087e2f408) at /home/builder/package/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1564
C = 0x55f087e2f408
GA = <optimized out>
lygstate / gist:daf6b45d37ee312c0141f717487e442b
Created Dec 25, 2019
View gist:daf6b45d37ee312c0141f717487e442b
#0 0x00007fb16e32a145 in malloc () from /lib/
No symbol table info available.
#1 0x0000000000000001 in ?? ()
No symbol table info available.
#2 0x00007fb16e0edebf in operator new(unsigned long) () from /usr/bin/../lib/
No symbol table info available.
#3 0x0000560c2d0fb23e in getMemory (numWords=2)
at /home/builder/package/llvm-project/llvm/lib/Support/APInt.cpp:46
No locals.
#4 0x0000560c2d0fb387 in llvm::APInt::initSlowCase (this=0x7fb16bd42270, that=...)
lygstate / gist:b3a7de98eb923e72dea6a14ae16c1dc5
Created Dec 25, 2019
View gist:b3a7de98eb923e72dea6a14ae16c1dc5
#0 0x00005573b440d7d2 in computeKnownBits (V=0x5573efdf4a18, Known=..., Depth=5, Q=...)
at /home/builder/package/llvm-project/llvm/include/llvm/IR/Type.h:223
BitWidth = 128
ScalarTy = 0x5573f4235fb0
ExpectedWidth = <optimized out>
C = <optimized out>
#1 0x00005573b4417baf in computeKnownBitsMul (Op0=0x5573f11d78f8, Op1=0x5573efdf4a18, NSW=false,
Known=..., Known2=..., Depth=4, Q=...)
at /home/builder/package/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:326
BitWidth = 128
You can’t perform that action at this time.