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 | |
file=$1 | |
function tile() { | |
convert $file -scale ${s}%x -crop 256x256 \ | |
-set filename:tile "%[fx:page.x/256]_%[fx:page.y/256]" \ | |
+repage +adjoin "${file%.*}_${s}_%[filename:tile].${file#*.}" | |
} | |
s=100 | |
tile | |
s=50 |
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 android.graphics.Bitmap; | |
import android.util.Log; | |
import com.squareup.picasso.Transformation; | |
/** | |
* Created by Sander Versluys on 21/10/14. | |
*/ | |
public class BlurTransform implements Transformation { |
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
var boysSection = false; | |
var test = $('#mw-content-text p a').map(function(data, w) { | |
var $name = $(w); | |
var name = $name.text(); | |
if (name == "Aad") boysSection = true; | |
var isBoy = boysSection || $('*:contains("'+name+' (+m)")').length > 0; | |
var isGirl = !boysSection || $('*:contains("'+name+' (+v)")').length > 0; |
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
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
include jni/libobj/Android.mk | |
include jni/libpng/Android.mk | |
include jni/libzip/Android.mk | |
include jni/freetype/Android.mk | |
include jni/ftgles/Android.mk | |
include jni/qcar/Android.mk |
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 json | |
import urllib2 | |
import unicodecsv | |
user = "ifsorbuts" | |
count = 100 | |
output = "tweets.csv" | |
feed = "https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&screen_name={0}&count={1}".format(user, count) |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>Car crash</title> | |
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.8.20/themes/base/jquery-ui.css"/> |
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 android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.preference.PreferenceManager; | |
import android.widget.Toast; | |
public class MySecretBroadcastReceiver extends BroadcastReceiver { | |
public static final String DEBUG_KEY = "DEBUG"; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Mˆller |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
div.t { background-color: #ddd; position: absolute; } | |
</style> | |
<script> | |
window.addEventListener('load', function() { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Mˆller |
NewerOlder