This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH in as root | |
By default you’re in /storage; switch to root partition: | |
cd / | |
Keep XBMC from restarting: | |
touch /var/lock/xbmc.disabled | |
Stop XBMC, so we can unmount /storage: | |
killall -9 xbmc.bin | |
umount /storage | |
Verify mounts: | |
mount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dynamic DNS | |
By using a domain name service, you can easily connect to your Raspberry Pi when you are not home. This is actually necessary if the IP address given by your provider changes frequently. But also if you always have the same IP: simply using a pretty url to connect is nice. | |
Schedule this script to run every x hours, mine runs every 4 hours: | |
crontab -e | |
add this line at the bottom: | |
0 */4 * * * sudo sh /etc/ipupdate/ipupdate.sh | |
# this script will check if the current external IP address has been |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = { | |
messages: [ | |
["Loading...", 0], | |
["Still loading... sorry", 2], | |
["Ok, it seems this is taking longer than we first thought. :(", 5], | |
["Your request seems to have failed, we shall investigate!", 5] | |
], | |
cur: 0, | |
id: '', | |
timer: '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CoreDataTableViewController.h | |
// | |
// Created for Stanford CS193p Winter 2013. | |
// Copyright 2013 Stanford University. All rights reserved. | |
// | |
// This class mostly just copies the code from NSFetchedResultsController's documentation page | |
// into a subclass of UITableViewController. | |
// | |
// Just subclass this and set the fetchedResultsController. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
You can now create a spinner using any of the variants below: | |
$("#el").spin(); // Produces default Spinner using the text color of #el. | |
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el. | |
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color). | |
$("#el").spin({ ... }); // Produces a Spinner using your custom settings. | |
$("#el").spin(false); // Kills the spinner. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header> | |
<h1>Beyonce Seamless Masonry Technique</h1> | |
<p>As designed by <a href="http://www.designedmemory.com/">designedmemory</a></p> | |
<p>See <a href="http://iam.beyonce.com/">iam.beyonce.com</a></p> | |
</header> | |
<div id="container"> | |
<div class="item"><img src="http://placekitten.com/300/350" /></div> | |
<div class="item"><img src="http://placekitten.com/300/300" /></div> | |
<div class="item"><img src="http://placekitten.com/300/450" /></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loadResource = function (filename, filetype){ | |
var loadedResource = undefined; | |
if (filetype === "js"){ //if filename is a external JavaScript file | |
loadedResource=document.createElement('script'); | |
loadedResource.setAttribute("type","text/javascript"); | |
loadedResource.setAttribute("src", filename); | |
} | |
else if (filetype === "css"){ //if filename is an external CSS file | |
loadedResource=document.createElement("link"); | |
loadedResource.setAttribute("rel", "stylesheet"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As of 9.19.2012: | |
Xcode 4.5 is the latest general release for Mountain Lion [specs]: | |
Build #: 4G182 (same as GM) | |
Includes iOS SDK: iOS 6.0 | |
Includes Mac SDK: Mac OS X 10.8 | |
Requires 10.7.4 and up | |
Available via the Mac App Store* | |
Includes the ability for Delta updates from the store | |
iPhone 5 support (4-inch launch image & armv7s) requires Xcode 4.5 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* to use WebSQL or the SQLite plugin (https://github.com/davibe/Phonegap-SQLitePlugin) with the same function) */ | |
executeSqlBridge: function(tx, sql, params, dataHandler, errorHandler) { | |
var self = this; | |
if (typeof self.db.dbPath !== 'undefined') { | |
//Native SQLite DB with phonegap : https://github.com/davibe/Phonegap-SQLitePlugin/ | |
//this is a native DB, the method signature is different: | |
var sqlAndParams = [sql].concat(params); | |
var cb = function(res) { |