Skip to content

Instantly share code, notes, and snippets.

View dennisvandalen's full-sized avatar

Dennis van Dalen dennisvandalen

View GitHub Profile
@dennisvandalen
dennisvandalen / eu-countries.json
Created August 19, 2021 02:44
Code description: Code - Three-digit numerical code defined by the United Nations; Alpha-2 - Two-character alpha code defined by the International Organization for Standardization (ISO); Alpha-3 - Three-character alpha code defined by the International Organization for Standardization (ISO). Source https://www23.statcan.gc.ca/imdb/p3VD.pl?Functi…
[
{
"code": "040",
"country": "Austria",
"alpha2": "AT",
"alpha3": "AUT"
},
{
"code": "056",
"country": "Belgium",
import urllib.request, json
with urllib.request.urlopen("https://api.coinmarketcap.com/v1/ticker/lisk/?convert=EUR") as url:
data = json.loads(url.read().decode())
print(data[0]['price_eur'])
<?php
$options = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36"
)
);
@dennisvandalen
dennisvandalen / RFIDTableTennis.ino
Created January 26, 2016 22:13
RFID and 433mhz to webserver WeMos D1
/*
----------------------------------------------------------------------------
Using MFRC522 library https://github.com/miguelbalboa/rfid
Using ESP8266WiFi library https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi
Using ESP8266HTTPClient library https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266HTTPClient
Using RemoteReceiver library https://github.com/jccprj/RemoteSwitch-arduino-library
MFRC522
Pin layout used:
--------------------------------------
@dennisvandalen
dennisvandalen / ActionRemoteTransmitterOnOff.ino
Last active December 19, 2015 00:29
Action (Impuls) 433MHz Remote Transmitter For Arduino, Turn on and off via Serial
// https://bitbucket.org/fuzzillogic/433mhzforarduino/wiki/Home
#include <RemoteTransmitter.h>
String incoming = ""; // for incoming serial data
ActionTransmitter actionTransmitter(11);
// pin 1,2,3,4 and 5 turned on
int receiver = 31;
char button = 'C';
@dennisvandalen
dennisvandalen / IntentDump.java
Last active August 29, 2015 14:21
Log all extras in intent
Bundle bundle = intent.getExtras();
if (bundle != null) {
Set<String> keys = bundle.keySet();
Iterator<String> it = keys.iterator();
Log.e("INTENT DUMP","Dumping Intent start");
while (it.hasNext()) {
String key = it.next();
Log.e("INTENT DUMP","[" + key + "=" + bundle.get(key)+"]");
}
Log.e("INTENT DUMP","Dumping Intent end");

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)