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
NODE_MODULES=../node_modules | |
JSX=$(NODE_MODULES)/react-tools/bin/jsx | |
R=$(NODE_MODULES)/requirejs/bin/r.js | |
BUILD_JSX=build/jsx | |
SOURCE_JSX=js2/app/jsx | |
BUILD_APP=build/app | |
SOURCE_APP=js2/app | |
BUILD_LIB=build/lib |
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
simply.text({ | |
title: 'Accel Demo', | |
body: 'Press up to stream or select to peek.', | |
}, true); | |
/** | |
* Use simply.accelConfig({ rate: 100, samples: 25 }) to configure | |
* the hertz and accel data per batch for the accelData events. | |
* See the API reference at simplyjs.io for more information. | |
*/ |
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
"""Terminal utilities.""" | |
# Author: Steen Lumholt. | |
from termios import * | |
__all__ = ["setraw", "setcbreak"] | |
# Indexes for termios list. | |
IFLAG = 0 |
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
<script type="text/javascript"> | |
var replaceDigits = function() { | |
var map = ["٠","١","٢","٣","٤", "٥","٦","٧","٨","٩"] | |
// replace english floating point with arabic one: | |
document.body.innerHTML = document.body.innerHTML.replace(/\d(?=[^<>]*(<|$))/g, function($0) { return map[$0]}); | |
// replace english floating point with arabic one: | |
document.body.innerHTML = document.body.innerHTML.replace(/\.(?=[^<>]*(<|$))/g, "٫"); | |
} | |
window.onload = replaceDigits; | |
</script> |
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 | |
repository=github.com | |
if [ -z "$GOPATH" ] ; then | |
echo '$GOPATH not set.' | |
exit 1 | |
fi | |
cd $GOPATH |
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
# A guide to prevent pain and suffering while upgrading to OS X Mavericks | |
# This will vary greatly depending on system set up, so read the instructions carefully | |
# Back up Virtulenvs | |
#################### | |
# Very important! | |
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv | |
# in order to prevent loss of dependencies during the upgrade. |
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
function countPieces() { | |
it = b.pieces(); | |
var i = 0; | |
while (it.current()){ i++; it.next() } | |
return i; | |
} | |
function getRandPiece() { | |
var it = b.pieces(); | |
var n = Math.floor(Math.random()*countPieces()); |
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 re | |
from django.utils.text import compress_string | |
from django.utils.cache import patch_vary_headers | |
from django import http | |
''' | |
EXAMPLE USAGE: | |
Put this file in a directory called, eg, 'middleware,' inside your django |
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
;; Simple Polymode for RaspberryPi Pico PIO files that uses | |
;; both asm-mode as host-mode and c-mode for pass-through section | |
(define-hostmode poly-pio-hostmode | |
:mode 'asm-mode) | |
(define-auto-innermode poly-pio-c-innermode | |
:mode 'c-mode | |
:head-matcher "^% c-sdk {$" | |
:tail-matcher "^%}$" |
OlderNewer