Skip to content

Instantly share code, notes, and snippets.

Alexander Prinzhorn Prinzhorn

View GitHub Profile
@Prinzhorn
Prinzhorn / LICENSE.txt
Created Oct 3, 2011 — forked from 140bytes/LICENSE.txt
Fibonacci with dynamic programming
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Prinzhorn
Prinzhorn / LICENSE.txt
Created Oct 3, 2011 — forked from 140bytes/LICENSE.txt
American Soundex
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexander Prinzhorn
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View dabblet.css
#box {
width:985px;
height:140px;
background:url(http://style.tutorials.de/v10/small-liveworkshops.jpg) repeat-y 0px 0px;
-moz-animation-duration: 5s;
-moz-animation-name: ticker;
-moz-animation-iteration-count:infinite;
-moz-animation-timing-function:linear;
}
@-moz-keyframes ticker {
@Prinzhorn
Prinzhorn / MySQL with .NET
Created Dec 20, 2011
All you basically need to use MySQL with .NET
View MySQL with .NET
using (MySqlDataReader reader = MySqlHelper.ExecuteReader(
"CONNECTION STRING",
"SELECT * FROM my_table WHERE foo=?bar;",
new MySqlParameter("?bar", 1337)/*, more params if needed */)
{
if(!reader.hasRows)
{
//No data
return;
@Prinzhorn
Prinzhorn / live-sample.js
Created Dec 28, 2011
jQuery-inlog samples
View live-sample.js
$('#about').siblings('h1').add('h2').css('color', '#09f').end().css('text-transform', 'uppercase');
@Prinzhorn
Prinzhorn / dabblet.css
Created Jan 25, 2012
Search form with fading search button
View dabblet.css
/**
* Search form with fading search button
* https://github.com/Prinzhorn
*/
.search {
border:1px solid #444;
display:inline-block;
}
@Prinzhorn
Prinzhorn / js.js
Created Jan 26, 2012
Use jQuery.animate to animate over multiple elements
View js.js
;(function($) {
$.fn.popIn = function(dur) {
var $all = this;
$('<b>').animate({
foobar: $all.length
}, {
easing: 'easeInOutBounce',
duration: dur,
View example.js
/*
Iterate over all elements and do some async work on each element, but ensure they all get worked on in order
*/
var arr = [1, 2, 3];
asyncForEach(arr, function(next, element) {
console.log(element);
//Simulate async db call
setTimeout(next, 1000);
You can’t perform that action at this time.