Skip to content

Instantly share code, notes, and snippets.

View syzer's full-sized avatar
🐕
Woof! Woof!

syzer syzer

🐕
Woof! Woof!
View GitHub Profile
@mmalecki
mmalecki / nextTick.js
Created October 2, 2011 12:13
process.nextTick vs setTimeout(fn, 0)
for (var i = 0; i < 1024 * 1024; i++) {
process.nextTick(function () { Math.sqrt(i) } )
}
@nateware
nateware / gist:3915757
Created October 19, 2012 01:27
Start Mac VNC server from command line
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
@kelvinn
kelvinn / cmd.sh
Created July 24, 2014 02:55
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
{
"result": "SUCCESS",
"interfaceVersion": "1.0.3",
"requested": "10/17/2013 15:31:20",
"lastUpdated": "10/16/2013 10:52:39",
"tasks": [
{
"id": 104,
"complete": false,
"priority": "high",
@syzer
syzer / gist:e7a69e8a31205766a7c0
Created November 3, 2014 16:52
FP workshop gist
// task #function composiotion
var articles = [
{
title: 'Why OO Sucks by Joe Armstrong',
url: 'http://www.bluetail.com/~joe/vol1/v1_oo.html',
author: {
name: 'Joe Armstrong',
email: '[email protected]'
}
},
@syzer
syzer / gist:a5ebde3031d76744397e
Last active August 29, 2015 14:11
Decorators are awesome
/**
* Created by syzer on 12/19/2014.
* ex shows how to decouple constant error checking from function/class body
* AKA TypeScript AKA WarnScript :)
*/
var _ = require('lodash');
function doStuffNumberPlusOneTimes(number, fun) {
"use strict";
@rrag
rrag / .block
Last active July 31, 2021 16:26
Chart with a dark theme
license: MIT
height: 770
@starfys
starfys / fisr.js
Last active May 18, 2024 00:09
Fast inverse square root in Javascript
//Based on the fast inverse square root function
// https://en.wikipedia.org/wiki/Fast_inverse_square_root
// Some original comments preserved for humor value
// Designed to try to mimic the original as closely as possible
function Q_rsqrt(number)
{
var i;
var x2, y;
const threehalfs = 1.5;
@arundasan91
arundasan91 / CaffeInstallation.md
Created April 2, 2016 22:16
Caffe Installation Tutorial for beginners

Caffe

Freshly brewed !

With the availability of huge amount of data for research and powerfull machines to run your code on, Machine Learning and Neural Networks is gaining their foot again and impacting us more than ever in our everyday lives. With huge players like Google opensourcing part of their Machine Learning systems like the TensorFlow software library for numerical computation, there are many options for someone interested in starting off with Machine Learning/Neural Nets to choose from. Caffe, a deep learning framework developed by the Berkeley Vision and Learning Center (BVLC) and its contributors, comes to the play with a fresh cup of coffee.

Installation Instructions (Ubuntu 14 Trusty)

The following section is divided in to two parts. Caffe's documentation suggest

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.