Skip to content

Instantly share code, notes, and snippets.

View adamotte's full-sized avatar

Anthony Damotte adamotte

View GitHub Profile
@riemers
riemers / dropbox.py
Last active May 22, 2020 02:15
Python uploader for dropbox (original found at https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=164166)
import os
import subprocess
from subprocess import Popen, PIPE
#The directory to sync
syncdir="/home/homeassistant/.homeassistant/"
#Path to the Dropbox-uploaded shell script
uploader = "/home/homeassistant/.homeassistant/extraconfig/shell_code/dropbox_uploader.sh"
#If 1 then files will be uploaded. Set to 0 for testing
crontab -e
*/5 * * * * /usr/bin/sudo -H /home/pi/my-scripts/checkwifi.sh >> /dev/null 2>&1
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# 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)
@lukecanvin
lukecanvin / backbone.localCache.js
Created July 20, 2012 08:56
Online/offline syncing for Backbone
Backbone.serverSync = Backbone.sync;
Backbone.pingUrl = '/Ping';
Backbone.localID = function() {
var localID = (localStorage.localID ? parseInt(localStorage.localID) : 0);
localID++;
localStorage.localID = localID.toString()
return -localID;
}
@zwaldowski
zwaldowski / MRSimpleXMLRequestOperation.h
Created October 30, 2011 03:53
AFHTTPRequestOperation subclass for simple XML parsing
//
// MRSimpleXMLRequestOperation.h
// Marked
//
// Created by Zachary Waldowski on 10/22/11.
// Copyright (c) 2011 Dizzy Technology. All rights reserved.
//
#import "AFHTTPRequestOperation.h"
#import "SMXMLDocument.h"