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 | |
// (c) Tom Van Looy <tom@ctors.net> https://ctors.net/isc_license.txt | |
// Alle feestdagen kunnen berekend worden, de berekende zijn allemaal | |
// afhankelijk van pasen. PHP heeft een functie easter_date(). | |
// Makkie dus. Hoe easter_date() zelf werkt kan je hier raadplegen: | |
// https://github.com/php/php-src/blob/master/ext/calendar/easter.c | |
// Geen parameter? Doen we gewoon dit jaar toch. |
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 | |
// https://twitter.com/#!/marcoarment/status/59089853433921537 | |
date_default_timezone_set('America/Los_Angeles'); | |
// Sosumi - a PHP client for Apple's Find My iPhone web service | |
// | |
// June 20, 2010 | |
// Tyler Hall <tylerhall@gmail.com> | |
// http://github.com/tylerhall/sosumi/tree/master | |
// |
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/bash | |
# | |
# putiodl - put.io cli downloader | |
# | |
# Copyright (C) 2013 Neal <neal@ineal.me> | |
# | |
# Dependencies: jq, curl, wget | |
# | |
# Make sure ~/.putiodl exists and contains your put.io OAuth token. | |
# |
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/bash | |
# | |
# putiodl - put.io cli downloader | |
# | |
# Copyright (C) 2013 Neal <neal@ineal.me> | |
# | |
# Dependencies: jq, curl, wget | |
# | |
# Make sure ~/.putiodl exists and contains your put.io OAuth token. | |
# |
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 | |
ini_set('max_execution_time', 0); | |
ini_set('memory_limit', -1); | |
$host = 'google.com'; | |
$ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306); | |
foreach ($ports as $port) | |
{ | |
$connection = @fsockopen($host, $port, $errno, $errstr, 2); |
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
set HUB to "192.168.1.216" --change for your bridge IP | |
set USER to "newdeveloper" | |
repeat | |
repeat with bulb from 1 to 2 -- Change if you have more bulbs or want to use a subset | |
set hue to (random number from 5000 to 12750) | |
set sat to (random number from 150 to 255) | |
set bri to (random number from 50 to 255) | |
set transitiontime to (random number from 1 to 3) -- Increase range for slower transitions | |
set query to "{\"sat\":" & sat & ",\"hue\":" & hue & ",\"bri\":" & bri & ",\"transitiontime\":" & transitiontime & "}" | |
set command to "curl --request PUT --data '" & query & "' http://" & HUB & "/api/" & USER & "/lights/" & bulb & "/state/ --connect-timeout 5" |