start new:
tmux
start new with session name:
tmux new -s myname
connection = Faraday::Connection.new('http://example.com') do |builder| | |
builder.request :url_encoded # for POST/PUT params | |
builder.adapter :net_http | |
end | |
# same as above, short form: | |
connection = Faraday.new 'http://example.com' | |
# GET | |
connection.get '/posts' |
/** | |
* A* (A-Star) Pathfinding Algorithm in JavaScript | |
* @author Matthew Trost | |
* @license Creative Commons Attribution-ShareAlike 3.0 Unported License | |
* @datepublished December 2010 | |
*/ | |
function astar (map, heuristic, cutCorners) { | |
var listOpen = []; | |
var listClosed = []; |
A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.
The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.
What can you say?
What is a closure?
How do we implement/create/use a closure in Ruby?
What's the difference between a closure in JS vs Ruby?
Why do we use closures so much more in JS as opposed to Ruby?
What is the Ruby analog of an anonymous function in Javascript?
''' | |
Bluetooth/Pyjnius example | |
========================= | |
This was used to send some bytes to an arduino via bluetooth. | |
The app must have BLUETOOTH and BLUETOOTH_ADMIN permissions (well, i didn't | |
tested without BLUETOOTH_ADMIN, maybe it works.) | |
Connect your device to your phone, via the bluetooth menu. After the | |
pairing is done, you'll be able to use it in the app. |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include "rope.h" | |
int main() { | |
printf("AFL test harness\n"); | |
rope *r = rope_new(); | |