Skip to content

Instantly share code, notes, and snippets.

@ChiChou
ChiChou / build-xnu-4903.221.2.sh
Created December 11, 2018 08:23 — forked from matteyeux/build-xnu-4903.221.2.sh
A script to build XNU version 4903.221.2 (macOS High Sierra 10.13). Initial script by Brandon Azad.
#! /bin/bash
#
# build-xnu-4903.221.2.sh
# Initial script by Brandon Azad (https://gist.github.com/bazad/654959120a423b226dc564073b435453)
# Updated on 12/11/18 by matteyeux
#
# A script showing how to build XNU version 4570.1.46 on MacOS High Sierra
# 10.13 with Xcode 9.
#
# Note: This process will OVERWRITE files in Xcode's MacOSX10.13.sdk. Make a
@ChiChou
ChiChou / dsc_syms.c
Created November 15, 2018 08:05 — forked from Siguza/dsc_syms.c
dyld_shared_cache symbols to r2 flags
#include <errno.h>
#include <fcntl.h> // open
#include <stdint.h>
#include <stdio.h> // printf, fprintf, stderr
#include <stdlib.h> // exit
#include <string.h> // strerror, strncmp
#include <sys/mman.h> // mmap
#include <sys/stat.h> // fstat
#include <mach-o/loader.h>
#include <mach-o/nlist.h>
@ChiChou
ChiChou / sqlite_fts_tokenizer.py
Created November 24, 2015 13:13 — forked from hideaki-t/sqlite_fts_tokenizer.py
a proof of concept implementation of SQLite FTS tokenizers in Python
# coding: utf-8
"""
a proof of concept implementation of SQLite FTS tokenizers in Python
"""
from __future__ import print_function, unicode_literals
import sys
import ctypes
from ctypes import POINTER, CFUNCTYPE
import struct
@ChiChou
ChiChou / bling.js
Last active March 12, 2023 07:48 — forked from paulirish/bling.js
/**
* bling.js
*/
window.$ = document.querySelectorAll.bind(document);
window.$id = document.getElementById.bind(document);
Array.prototype.each = Array.prototype.forEach;
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, delegate, fn) {
@ChiChou
ChiChou / config.json
Last active August 29, 2015 14:13 — forked from anonymous/config.json
Bootstrap build config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
import numpy as np
from scipy.sparse import csc_matrix
def pageRank(G, s = .85, maxerr = .001):
"""
Computes the pagerank for each of the n states.
Used in webpage ranking and text summarization using unweighted
or weighted transitions respectively.