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
stoppa in detta i ditt tweetdeck under preferences > global filter. | |
#melo2012, #mel2012, #dif, #twittboll, #mel12012, #melodifestivalen, #mel2012, #melfest, #mel21012, #melfest2012, melodifestivalen, sean banan, ranelid, flinck |
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
# hämta ut en array med dina likeade urlar | |
if($urls){ | |
foreach($urls as $url){ | |
# fetch stats from fb | |
$fbdata = @json_decode($this->curl->simple_get('http://api.facebook.com/restserver.php?method=links.getStats&urls='.$url.'&format=json')); | |
$likes = $fbdata ? $fbdata[0]->total_count : 0; | |
# uppdatera denna marker med hur många likes den har i databasen. nya värdet på likes finns i: $likes |
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 python | |
import pika | |
import time | |
credentials = pika.credentials.PlainCredentials('guest', 'guest') | |
parameters = pika.ConnectionParameters( | |
host="127.0.0.1", | |
credentials=credentials) | |
connection = pika.BlockingConnection(parameters) | |
channel = connection.channel() |
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 python | |
import os | |
import sys | |
import datetime | |
import time | |
import logging | |
try: | |
import MySQLdb as db |
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
<?php | |
$lockfile = '/tmp/cron_mylongrunningstuff.lock'; | |
if(file_exists($lockfile)){ | |
echo 'Hey, another process is already running, lockfile: '.$lockfile."\n"; | |
exit(0); | |
}else{ |
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
<?php | |
if(stristr($_SERVER['HTTP_USER_AGENT'], ' MSIE 9')){ | |
$msie_post = file_get_contents("php://input"); | |
parse_str($msie_post, $_POST); | |
} |
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
@Override | |
public void onNotificationPosted(StatusBarNotification statusBarNotif) { | |
Notification notif = statusBarNotif.getNotification(); | |
if (notif != null){ | |
Bundle extras = notif.extras; | |
Intent intent = new Intent(MainActivity.INTENT_NOTIFICATION); | |
intent.putExtras(notif.extras); |
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
earth people är en webbyrå i stockholm. | |
vi gör roliga projekt åt bland annat halebop, amnesty, red bull och andra direktkunder | |
och hjälper även reklambyråer i sverige och usa att producera digitala kampanjer. | |
just nu är vi 11, men vill bli fler om rätt person dyker upp. | |
roller vi är intresserade av att fylla för närvarande är: | |
- produktionsledare | |
- strateg (tillsatt!) | |
- kreatör/designer |
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
<?php | |
date_default_timezone_set("Europe/Stockholm"); | |
require 'vendor/autoload.php'; | |
use GuzzleHttp\Pool; | |
use GuzzleHttp\Client; | |
$client = new Client(); |
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
<?php | |
$data = array( | |
"percent" => "100", | |
"duration_ms" => "10000" | |
); | |
$url_send = "https://api-http.littlebitscloud.cc/devices/XXX/output"; | |
$str_data = http_build_query($data); | |
$ch = curl_init($url_send); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer XXX','Accept: application/vnd.littlebits.v2+json')); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); |
OlderNewer