- 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
Add this .plist to ~/Library/LaunchAgents to have it automatically | |
take effect whenever you log in. It will continue to be active until | |
you log out (even if you delete the file). | |
You can take manual control over it instead by putting the file | |
anywhere else, then using launchctl like this: | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
launchctl load path/to/the/plist/com.admsyn.keep-twitter-alive.plist | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
Find all available devices arp -a
Locate Raspberry (b8:27:eb) in Network: Pi Finder
extension Array { | |
func first() -> Element? { | |
if isEmpty { | |
return nil | |
} | |
return self[0] | |
} | |
func last() -> Element? { |
import Foundation | |
import CryptoSwift | |
extension String { | |
func aesEncrypt(key: String, iv: String) throws -> String{ | |
let data = self.dataUsingEncoding(NSUTF8StringEncoding) | |
let enc = try AES(key: key, iv: iv, blockMode:.CBC).encrypt(data!.arrayOfBytes(), padding: PKCS7()) | |
let encData = NSData(bytes: enc, length: Int(enc.count)) | |
let base64String: String = encData.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue: 0)); |
#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
contract random { | |
/* Generates a random number from 0 to 100 based on the last block hash */ | |
function randomGen(uint seed) constant returns (uint randomNumber) { | |
return(uint(sha3(block.blockhash(block.number-1), seed ))%100); | |
} | |
/* generates a number from 0 to 2^n based on the last n blocks */ | |
function multiBlockRandomGen(uint seed, uint size) constant returns (uint randomNumber) { | |
uint n = 0; | |
for (uint i = 0; i < size; i++){ |
As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.
⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates
What this will cover
www.website.com
to website.com
index.html
)