Skip to content

Instantly share code, notes, and snippets.

@lygstate
lygstate / gist:8262ecbef452dc668e30d40c5795bb06
Last active December 25, 2019 16:18
Full log of ld.lld 9.0.1 coredump for chromium 78 on alpine
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
lygstate / glfwAngle.cpp
Last active July 14, 2016 10:54
glfw with gis
#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
lygstate / A better IndexedDB IMHO.md
Created October 28, 2015 01:58 — forked from netroy/A better IndexedDB IMHO.md
A better IndexedDB IMHO

--------- 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.

#!/usr/bin/python
"""
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.
"""
#include<stdio.h>
#include<stdlib.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<fcntl.h>
#include<unistd.h>
#define SIZE_4K 1024*4
int getFileSize(char * strFileName)
@lygstate
lygstate / archive.py
Last active August 29, 2015 14:24 — forked from Eccenux/archive.py
#!/usr/bin/env python
import os
import zipfile
"""
Helper class that lets one add whole directory contents.
License
--------------------
@lygstate
lygstate / configure.py
Last active August 29, 2015 14:19 — forked from luser/configure.py
import argparse
import fnmatch
import os
import string
import subprocess
import sys
from collections import defaultdict
SUBSTS = set(['MOZ_PERMISSIONS', 'MOZ_DMD', 'HAVE_64BIT_BUILD', 'MOZ_CAN_RUN_PROGRAMS', 'MOZ_WIDGET_TOOLKIT', 'MOZ_PNG_ARM_NEON_CHECK', 'MOZ_ALLOW_HEAP_EXECUTE_FLAGS', 'AR_EXTRACT', 'TAR', 'MOZ_SERVICES_COMMON', 'MOZ_VPX_ERROR_CONCEALMENT', 'ZLIB_IN_MOZGLUE', 'MOZ_JPROF', 'MOZ_SOCIAL', 'NONASCII', 'MOZ_MULET', 'VPX_ASFLAGS', 'MOZ_APP_ID', 'MOZ_NO_EV_CERTS', 'MOZ_PNG_CFLAGS', 'MOZ_CHILD_PROCESS_NAME', 'MOZ_OPUS', 'OBJCOPY', 'ASM_SUFFIX', 'MOZ_WEBSPEECH', 'MOZ_FIX_LINK_PATHS', 'GRE_MILESTONE', 'HOST_LDFLAGS', 'VISIBILITY_FLAGS', 'TARGET_MD_ARCH', 'MOZ_ASAN', 'MOZ_APP_UA_NAME', 'GST_API_VERSION', 'MOZ_DEVICES', 'MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS', 'MOZ_SERVICES_HEALTHREPORT', 'MOZ_JPEG_CFLAGS', 'MOZ_B2G_FM', 'MOZ_B2G_RIL', 'MOZ_ANDROID_OMTC', 'MOZ_METRO', 'DSO_LDOPTS', 'MOZ_OPTIMIZE_LDFLAGS', 'MOZ_DISABLE_PARENTAL_CONTROLS', 'OS_LDFLAGS', '_MSC_VER', 'MKSHLIB_FORCE_ALL', 'MOZ_NUWA_PROCESS'
// Generated by gfwlist2pac
// https://github.com/clowwindy/gfwlist2pac
var domains = {
// "github.com": 1,
"xda-developers.com": 1,
"googleapis.com": 1,
"gmail.com" : 1,
"googlesource.com": 1,
"google.com": 1,