Skip to content

Instantly share code, notes, and snippets.

View RyanKung's full-sized avatar
🏠
Working from home

Elder Ryan RyanKung

🏠
Working from home
View GitHub Profile
@Ad115
Ad115 / tree_reduce.py
Created October 15, 2019 19:52
A generic tree reduce algorithm in Python
"""
Generic recursive tree reduce algorithm
=======================================
Trees are one of the most ubiquitous data structures. It is amazing how often we
as programmers tend to reimplement the same algorithms for different trees.
This module defines a generic tree-reduce algorithms that can be
used with any tree-like object such as filesystem paths, lists, nested
dictionaries an expression tree or even specialized tree classes! The only thing
@fuxialexander
fuxialexander / pdumper_master.patch
Created June 13, 2018 13:20
pdumer patch against emacs master
From cfcd0ab61c8c84d41095a9b08fbf588f7c8c391c Mon Sep 17 00:00:00 2001
From: fuxialexander <[email protected]>
Date: Sat, 26 May 2018 22:45:28 +0800
Subject: [PATCH] Add: add pdumper: Squashed commit of the following:
commit faaaeceec4a9f199942bd35b1b83e0345c828d82
Author: Alan Third <[email protected]>
Date: Sat Mar 31 10:49:59 2018 +0100
Copy pdmp file to Emacs.app
@orther
orther / 0_all_webkit.patch
Created April 25, 2018 02:28 — forked from fuxialexander/0_all_webkit.patch
One-stop patch for Emacs NS-port xwidget (by @veshboo)
From 844e9efeac1371b9dfbd0ee73d62129d251577a1 Mon Sep 17 00:00:00 2001
From: Jaesup Kwak <[email protected]>
Date: Mon, 4 Dec 2017 21:23:19 +0900
Subject: [PATCH] Support xwidget webkit for macOS X
Add xwidget webkit support for macOS X / NS Cocoa and accompanying
changes.
Squash changes for comments from Alan Third in Bug#29565.
@BusFactor1Inc
BusFactor1Inc / lispchain.lisp
Last active April 16, 2021 16:37
Lispchain - a blockchain implementation (sketch) in Common Lisp
;;
;; scheme coin - a lispchain (aka blockchain) implementation
;;
;; Burton Samograd
;; [email protected]
;; Copyright - 2017
;;
;; Interested in helping out with the code? Email me.
;;
;; Bitcoin: 1HzWXjoQjzdLBm1eKeuWFrZx96kiop5GGy
@ViktorQvarfordt
ViktorQvarfordt / trello-mathjax.user.js
Last active January 22, 2019 18:18
Apply Mathjax to Trello
// ==UserScript==
// @name MathJax Trello
// @description Apply Mathjax to Trello
// @include https://trello.com/*
// @grant none
// ==/UserScript==
// INSTALL: https://gist.githubusercontent.com/ViktorQvarfordt/c3f89c3cf50e3dc60b23257294af5710/raw/trello-mathjax.user.js
if (window.MathJax === undefined) {
@Kubuxu
Kubuxu / ipfs-daemon-remote.sh
Last active March 2, 2021 06:34
Tunnel IPFS API via SSH
#!/usr/bin/env bash
REMOTE_HOST=${1-"YOUR REMOTE HOST HERE"}
DEFAULT_API_FILE="$HOME/.ipfs/api"
API_FILE="${IPFS_PATH-$DEFAULT_API_FILE}"
if [ -e "$API_FILE" ]; then
echo "IPFS API is already running"
exit 1
fi
/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@Paxa
Paxa / _wget.md
Last active April 1, 2020 04:25
Cross-compiling wget for blackberry 10 (QNX)

How to compile wget for blackberry 10

Prepare

  1. Download from here http://ftp.gnu.org/gnu/wget/
  2. Extract sources archive, (using extract for example)
  3. Or run tar xf wget-1.15.tar.xz
  4. Copy file bb10_compile from this gist to source folder

Compile

require 'formula'
# Adapted from https://trac.macports.org/browser/trunk/dports/www/webkit-gtk
# Tested with newer glib and libsoup than currently in homebrew (also in tap).
class Webkitgtk < Formula
homepage 'http://webkitgtk.org/'
url 'http://webkitgtk.org/releases/webkitgtk-1.11.92.tar.xz'
sha1 'dbe9053eb8a9516cff6e796a4ba463bbb14fc464'
depends_on 'pkg-config' => :build