- Related tutorial: http://raspberrypiguide.de/
- Command Line Cheatsheet: https://gist.github.com/hofmannsven/8392477
Find all available devices arp -a
Locate Raspberry (b8:27:eb) in Network: Pi Finder
// AFNetworking | |
[[AFHTTPSessionManager manager] GET:@"http://httpbin.org/ip" parameters:nil success:^(NSURLSessionDataTask *task, id JSON) { | |
NSLog(@"IP Address: %@", JSON[@"origin"]); | |
} failure:^(NSURLSessionDataTask *task, NSError *error) { | |
NSLog(@"Error: %@", error); | |
}]; | |
// NSURLSession | |
NSURL *URL = [NSURL URLWithString:@"http://httpbin.org/ip"]; |
{ | |
"metadata": { | |
"kernelspec": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"display_name": "IPython (Python 2)", | |
"language": "python", | |
"name": "python2" |
#!/usr/bin/env bash | |
progname=$(basename $0) | |
version="1.0 (2014-08-17)" | |
step=2 | |
function create_hash { | |
openssl dgst -sha1 -binary <<< "$1" | xxd -p | |
} |
right_of(X, Y) :- X is Y+1. | |
left_of(X, Y) :- right_of(Y, X). | |
next_to(X, Y) :- right_of(X, Y). | |
next_to(X, Y) :- left_of(X, Y). | |
solution(Street, FishOwner) :- | |
Street = [ | |
house(1, Nationality1, Color1, Pet1, Drinks1, Smokes1), | |
house(2, Nationality2, Color2, Pet2, Drinks2, Smokes2), |
Find all available devices arp -a
Locate Raspberry (b8:27:eb) in Network: Pi Finder
#!/usr/bin/env perl | |
# | |
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder | |
use strict; | |
use warnings; | |
use URI::Escape qw(uri_escape_utf8); | |
use open IO => ":utf8", # UTF8 by default | |
":std"; # Apply to STDIN/STDOUT/STDERR |
# This script only works in Mac OS X, due to the dependency | |
# on the `open` command. | |
# It can be directly added into a .profile file, either | |
# by copying and pasting its content, or sourcing the | |
# file: | |
# . search_functions.sh | |
# Usage: google any search terms | |
# Result: default browser opens with a query on any |
#!/usr/bin/env ruby | |
require "fileutils" | |
require "redcarpet" | |
OUTPUT_FOLDER = "html" | |
HTML_TEMPLATE = <<-HTML | |
<!DOCTYPE html> | |
<html> |
#!/usr/bin/env ruby | |
# PBS 4 Dec. 2013 | |
# Renders HTML for all the .markdown files in the current directory. | |
# Gives each file a .html suffix. | |
# Saves them in a subfolder called HTML. | |
require 'rdiscount' | |
require 'find' | |
require 'fileutils' |
on downloadUrl(theUrl, fileName) | |
set curlCmd to "curl -s -L -o " & fileName & " '" & theUrl & "' " | |
--display dialog curlCmd | |
do shell script curlCmd | |
end downloadUrl | |
on run {input, parameters} | |
set theUrls to {} | |
repeat with kmlFile in input |