This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/externals/stratum b/externals/stratum | |
--- a/externals/stratum | |
+++ b/externals/stratum | |
@@ -1 +1 @@ | |
-Subproject commit 8ba1b5fd8a802b981f31dace4cf920cfb4a3907c | |
+Subproject commit 8ba1b5fd8a802b981f31dace4cf920cfb4a3907c-dirty | |
diff --git a/lib/halfnode.py b/lib/halfnode.py | |
index 4ffc017..aca8cc8 100644 | |
--- a/lib/halfnode.py | |
+++ b/lib/halfnode.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; This script can be loaded during emacs initialization to automatically | |
;;;; send `kill-region' and `kill-ring-save' regions to your system clipboard. | |
;;;; The OSC 52 terminal escape sequence is used to transfer the selection from | |
;;;; emacs to the host terminal. | |
;;;; It is based off of the osc52.el copyright the Chromium OS authors, but | |
;;;; was modified to add support for tmux, graphical displays, and | |
;;;; multi-byte strings. | |
;;;; It works in hterm, xterm, and other terminal emulators which support the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage | |
## Example 1 (Text) | |
# $ echo foobar | wpbcopy | |
# $ wpbpaste | |
# foobar | |
## Example 2 (Binary) | |
# $ cat image.jpg| wpbcopy | |
# $ wpbpaste | file - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun send-region-to-clipboard (START END) | |
;; Place https://github.com/skaji/remote-pbcopy-iterm2/blob/master/pbcopy as `cpbcopy` | |
(interactive "r") | |
(let ((infile (make-temp-file "send-region-to-clipboard"))) | |
(write-region (buffer-substring (region-beginning) (region-end)) | |
nil | |
infile | |
nil | |
'nomsg) | |
(with-temp-buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
color256() | |
{ | |
# Output the color code from given RGB value. | |
# If the sole argument given, return it directly. | |
# One arg usage: | |
# - $1: color code [0-255] | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Rx = require('rx'); | |
var Observable = Rx.Observable; | |
var match = ["ズン", "ズン", "ズン", "ズン", "ドコ"]; | |
Observable.create((obs) => { | |
obs.onNext(Math.random() > 0.5 ? "ズン" : "ドコ"); | |
obs.onCompleted(); | |
}) | |
.do((e) => { console.log(e); }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../google-map/google-map.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var emit = Rx.Observable | |
.fromNodeCallback(that.socket.emit, | |
null, | |
that.socket); // Socket.io needs the socket as the context to handle ack. | |
emit.subscribe(function() { | |
// ... | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils import simplejson as json | |
class SerializeMethod(object): | |
def __init__(self): | |
self.type = type_ | |
self.func = func | |
class CustomJSONEncoder(json.JSONEncoder): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cmath | |
def fft(data): | |
data = data[:] # copy data to avoid side effect | |
N = len(data) | |
w = calc_coefficients(N) | |
reorder_data(data) | |
a = 1 |