Skip to content

Instantly share code, notes, and snippets.

'''
Author: Yotam Gingold <yotam (strudel) yotamgingold.com>
License: Public Domain. (I, Yotam Gingold, the author, dedicate any copyright to the Public Domain.)
http://creativecommons.org/publicdomain/zero/1.0/
'''
from math import sqrt
from numpy import asfarray
def sgn( x ):
#!/bin/sh
#
# Startup script for btsync
# Copy to /usr/local/etc/rc.d/S99btsync.sh and chown to root:root
#
# Stop myself if running
btsyncdir="/var/services/homes/yotam/btsync/"
btsync="${btsyncdir}/btsync"
pidfile="${btsyncdir}/.sync/sync.pid"
#
@yig
yig / JavaScript reference.md
Last active April 21, 2024 23:36
An overview of JavaScript best practices. Geared towards someone with a C/C++/Java/Python background.

JavaScript reference for non-JavaScript programmers

Author: Yotam Gingold
License: Public Domain (CC0)

This document is intended as a reference or introduction to JavaScript for someone familiar with a language like C/C++/Java or Python. It follows best practices and gathers the scattered wisdom from matny stackoverflow questions and in-depth JavaScript essays. It relies on no external libraries.