http://facebook.com/282370021775789/posts/632302926782495/?comment_id=7137742 NULL added_photos -2194 http://facebook.com/282370021775789/posts/605009006178554/?comment_id=6957173 NULL added_photos -5554 http://facebook.com/282370021775789/posts/608884202457701/?comment_id=6982288 NULL added_photos -9161 http://facebook.com/282370021775789/posts/591553637524091/?comment_id=6844202 NULL added_photos -18518 http://facebook.com/282370021775789/posts/461465503866239/?comment_id=5740129 NULL added_photos -20583 http://facebook.com/282370021775789/posts/608917252454396/?comment_id=6982288 NULL added_photos -23288 http://facebook.com/282370021775789/posts/459607920718664/?comment_id=5724526 NULL added_photos -31083 http://facebook.com/282370021775789/posts/609110459101742/?comment_id=6982288 Occupy Los Angeles added 12 new photos to the album Turkey #OccupyGezi. added_photos -120751 http://facebook.com/282370021775789/posts/591759734170148/?comment_id=6844202
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
update post_play set likes_count=(select count(*) from likedby as ls where ls.page_id=post_play.page_id AND ls.post_id=post_play.id AND ls.comment_id=0) WHERE likes_count IS NULL limit 1000000; | |
update post_play set comments_count=(select count(*) from comment co where co.page_id=post.page_id AND co.post_id=post.id) WHERE comments_count IS NULL limit 1000000; |
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
#!/usr/bin/env bash | |
# ================================================================================ | |
# A git-diftool utility for a TeX file using `latexdiff`. | |
# | |
# | |
# Usage | |
# ----- | |
# git latexdiff [<commit>] | |
# git latexdiff --cached [<commit>] | |
# |
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
#!/bin/sh | |
APIKEY="YOUR KEY" | |
trap '' 1 2 9 15 SIGSTOP | |
stty -F /dev/usb/acm/0 9600 -hupcl | |
while true; do | |
if [ -r /dev/usb/acm/0 ]; then |
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
/* | |
* Nexa Receiver | |
* Controls 4 relays connected to Aurduino I/O pins. | |
* Transmitter codes are hard-coded as a fixed number in the Sketch. | |
* src: http://www.telldus.com/forum/viewtopic.php?f=12&t=4072 | |
* | |
* The code has been validated to work with the following NEXA transmitters: | |
* | |
* WBT 912 2ch sender | |
* WT2 PRO 2ch Wall sender |
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
<html> | |
<title>BTH Database Test</title> | |
<pre> | |
<?php | |
DEFINE("_SQL_SERVER_", "194.47.129.139"); | |
DEFINE("_SQL_USER_", ""); | |
DEFINE("_SQL_PASSWORD_", ""); | |
DEFINE("_SQL_DATABASE_", _SQL_USER_); |
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
import oauth2 as oauth | |
import json, time, requests, datetime | |
import re, string | |
XIVELY_API_KEY = "" | |
XIVELY_FEED_ID = "" | |
TELLDUS_PUB_KEY = "" | |
TELLDUS_PRIV_KEY = "" | |
TELLDUS_TOKEN = "" | |
TELLDUS_SECRET = "" |
Install raspbian wheezy packages:
sudo apt-get install git python3-pip redis-server rabbitmq-server libxml2-dev python3-lxml python3-crypto yum
Install mongodb (not includes in default repo) from https://github.com/tjanson/mongodb-armhf-deb:
wget https://github.com/tjanson/mongodb-armhf-deb/releases/download/v2.1.1-1/mongodb_2.1.1_armhf.deb
sudo apt-get install libboost1.49-dev libicu48 libboost-dev
sudo dpkg -i mongodb_2.1.1_armhf.deb
sudo /etc/init.d/mongodb start
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
""" | |
Change the constants below. | |
""" | |
fileName = "INSERT FILENAME" | |
API = "INSERT API-WRITE-KEY" | |
nodeID = 13 | |
urlString = "http://emoncms.org/input/bulk.json?time=%d&apikey=%s&data=[" | |
import pandas as pd |
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
import tarfile | |
import os | |
from glob import glob | |
import sys | |
with tarfile.open(sys.argv[1]) as tar: | |
for f in tar: | |
name = f.name[:-5] | |
if os.path.isfile(name + "#001.json"): | |
index = len(glob(name + "*")) + 1 |