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
<?php | |
header('Content-type: text/plain; charset=utf8'); | |
$input = "hab me eben nen leet-speak generator geschrieben.."; | |
$words = array( | |
'one' => 1, | |
'to' => 2, | |
'too' => 2, |
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
function tokenize (input) { | |
function Token(type, isOpenUntil) { | |
this.type = type; | |
this.value = ""; | |
this.isOpenUntil = isOpenUntil || false; | |
} | |
var i = 0, | |
len = input.length, | |
tokens = [], |
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 myGIGA | |
// @version 1.0.3 | |
// @include http://www.giga.de/ | |
// ==/UserScript== | |
var main = function () { | |
var myGIGA = { | |
Teaser: function (title, url, image) { | |
this.title = title; |
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
<?php | |
error_reporting(E_ALL + E_STRICT); | |
require_once __DIR__.'/../vendor/autoload.php'; | |
use Silex\Application; | |
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\Routing\RequestContext; |
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
<?php | |
namespace schokocappucino\Nameless\User\PasswordEncoder; | |
class CryptBlowfishPasswordEncoder implements PasswordEncoderInterface { | |
protected $cost = 10; | |
public function __construct($cost) { | |
if ($cost < 4 || $cost > 31) | |
throw new Exception('Invalid bcrypt cost parameter specified: '.$cost); |
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
say -v 'pipe organ' Dum dum dee dum dum dum dum dee Dum dum dee dum dum dum dum dee dum dee dum dum dum de dum dum dum dee dum dee dum dum dee dummmmmmmmmmmmmmmmm | |
say -v Cellos Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo | |
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
<?php | |
class GitoliteConfigParser { | |
public function parse($config) { | |
$lines = explode("\n", $config); | |
// remove comments and spaces | |
$lines = array_filter(array_map(function ($line) { | |
$line = preg_replace('/#(.*)$/', '', $line); | |
return preg_replace('/^\s+/', '', $line); |
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
Wahrheitstafeln | |
1P1, 1A1 | |
Aussagenlogik | |
1P2, 1A2, 2P3, 2A3, 2P2, 2A2 | |
Quantoren | |
1P3, 1A3 | |
Mengenoperationen |
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 path: NSString = NSWorkspace.sharedWorkspace().absolutePathForAppBundleWithIdentifier("com.apple.dt.xcode")! | |
var icon: NSImage = NSWorkspace.sharedWorkspace().iconForFile(path) | |
var data: NSData = icon.TIFFRepresentation! | |
var bitmap: NSBitmapImageRep = NSBitmapImageRep(data: data)! | |
data = bitmap.representationUsingType(NSBitmapImageFileType.NSPNGFileType, properties: [:])! | |
var base64: NSString = "data:image/png;base64," + data.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.allZeros) | |
println(base64) |
OlderNewer