Skip to content

Instantly share code, notes, and snippets.

View Radiotechniman's full-sized avatar

Radiotechniman

View GitHub Profile
@Radiotechniman
Radiotechniman / feestdagen.php
Last active December 5, 2020 10:45 — forked from tvlooy/feestdagen.php
Feestdagen berekenen
<?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.
<?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
//
@Radiotechniman
Radiotechniman / putiodl
Created June 15, 2018 19:04 — forked from Neal/putiodl
put.io cli downloader
#!/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.
#
@Radiotechniman
Radiotechniman / putiodl
Created June 15, 2018 19:04 — forked from Neal/putiodl
put.io cli downloader
#!/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.
#
@Radiotechniman
Radiotechniman / port_scanner.php
Created March 8, 2018 15:47 — forked from akalongman/port_scanner.php
Port scanner on PHP
<?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);
@Radiotechniman
Radiotechniman / Philips Hue Candle Effect
Created December 4, 2016 18:32 — forked from jamesabruce/Philips Hue Candle Effect
High speed, flickering candle bulb effect for any number of Philips Hue bulbs
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"