View TumblrExample.java
/** Example from https://github.com/scribejava/scribejava/blob/master/scribejava-apis/src/test/java/com/github/scribejava/apis/examples/TumblrExample.java | |
*/ | |
import java.util.Scanner; | |
import com.github.scribejava.core.builder.ServiceBuilder; | |
import com.github.scribejava.core.model.OAuth1AccessToken; | |
import com.github.scribejava.core.model.OAuth1RequestToken; | |
import com.github.scribejava.core.model.OAuthRequest; | |
import com.github.scribejava.core.model.Response; | |
import com.github.scribejava.core.model.Verb; | |
import com.github.scribejava.core.oauth.OAuth10aService; |
View gamers4refugees.js
var donations = 0, | |
lastCheck = 0, | |
lastFollower = "", | |
project_id = 24307; | |
function checkForNew(){ | |
$.getJSON("https://api.betterplace.org/de/api_v4/fundraising_events/"+project_id+"/opinions.json?order=created_at:DESC&facets=has_donation:true&per_page=1", function(data){ | |
donations = data.total_entries; | |
if(donations > lastCheck && lastCheck!=0){ |
View java-properties.php
/** | |
* return a position of needles | |
* credits goes to "msng" (https://gist.github.com/msng/5039773) | |
* | |
* @param String $haystack | |
* @param array of $needles | |
* @param number $offset | |
* @return Ambigous <boolean, number>|boolean|number | |
*/ | |
private static function strpos_array ($haystack, $needles, $offset = 0) |