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 libraries | |
const functions = require("firebase-functions"); | |
const admin = require("firebase-admin"); | |
//init | |
admin.initializeApp(); | |
const firestore = admin.firestore(); | |
//Create a function that is triggered by Storage | |
//https://firebase.google.com/docs/storage/extend-with-functions#trigger_a_function_on_changes |
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
package nl.frankkie.retrofitbug; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import okhttp3.ResponseBody; | |
import okhttp3.mockwebserver.MockResponse; | |
import okhttp3.mockwebserver.MockWebServer; | |
import retrofit2.Call; | |
import retrofit2.Callback; |
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
// ==UserScript== | |
// @name A Dark Room notifier | |
// @namespace http://adarkroom.doublespeakgames.com/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://adarkroom.doublespeakgames.com/ | |
// @grant none | |
// ==/UserScript== |
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
//Andon's Color Badge basic program. | |
//Utilizes the ST7735 driver from Adafruit and the Adafruit Graphics Library | |
//Documentation can be found here: https://learn.adafruit.com/adafruit-gfx-graphics-library/graphics-primitives | |
//Due to size constraints (And my own coding abilities), no SD card interactions are programmed in. | |
//However, the standard SD card library can be used. I've added the SD card chip select pin below for reference. | |
#include <Adafruit_GFX.h> // Core graphics library | |
#include <Adafruit_ST7735.h> // Hardware-specific library | |
#include <SPI.h> |
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
/* | |
The Spotify API call, 'top-tracks' requires a ISO 3166-1 alpha-2 country code | |
//https://developer.spotify.com/web-api/get-artists-top-tracks/ | |
//https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 | |
//https://www.spotify.com/nl/legal/end-user-agreement/plain/#s19 | |
//EU is not included in this list, as it generates this error: | |
{ | |
"error": { | |
"status": 400, | |
"message": "Invalid country code" |
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
//Java Exceptions Testing. Finding out how re-throwing affects the stacktrace. | |
//Tested in: http://www.compilejava.net/ | |
public class HelloWorld | |
{ | |
public static void main(String[] args) throws Exception | |
{ | |
testThrowUp(); | |
} | |
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
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-item/paper-item.html"> | |
<link rel="import" href="../paper-checkbox/paper-checkbox.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="app_name">Brony MLP Überraschungspony Ratgeber</string> | |
<string name="main_welcome">"My Little Pony G4 Überraschungspony Ratgeber | |
Erstellt mit Daten der MLPMerch.com Überraschungspony-Datenbank. | |
Besuchen Sie MLPMerch.com für die Online Überraschungspony-Datenbank und MLP Merchandise Nachrichten!"</string> | |
<string name="action_settings">Einstellungen</string> | |
<string name="tut1">"Wussten Sie, das es gar keine große Überraschung sein muss, welches Pony sich in einer MLP-Überraschungspony Tüte versteckt? | |
Der Inhalt einer Überraschungspony Tüte lässt sich einfach feststellen ohne sie zu öffnen. |
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
//Recursive | |
function A(n){ | |
if (n <=0){return 0;} | |
return 1 - (1 - A( n - 1)) / 2; | |
} | |
//Not recursive, using a loop | |
function B(n){ | |
if (n<=0){return 0;} | |
//TODO insert smart code here |
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
De Bet: | |
if (@W is LVL8 in Ingress op 2 juli 2014, 19:23, of eerder){ | |
@F.geeft(@W, "6 beugelflessen"); | |
} else { | |
@W.geeft(@F, "6 beugelflessen"); | |
} |