This file contains hidden or 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 | |
/** | |
* An attempt to make arrays into objects, I guess. | |
*/ | |
namespace Core; | |
class Arr { |
This file contains hidden or 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 | |
$imported_files = array(); | |
$include_paths = array_merge(array(__DIR__), explode(':', ini_get('include_path'))); | |
class ImportError extends \Exception { | |
public function __construct($class) { | |
trigger_error(sprintf('Class "%s" was not found in any of available paths.', $class), E_USER_ERROR); | |
} | |
} |
This file contains hidden or 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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>TODO: | |
• Try to improve parameters list syntax – scope numbers, ‘=’, ‘,’ and possibly be intelligent about entity ordering | |
• Is meta.function-call the correct scope? I've added it to my theme but by default it's not highlighted</string> | |
<key>fileTypes</key> | |
<array> |
This file contains hidden or 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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Michael Sheets, James Cleveland</string> | |
<key>name</key> | |
<string>TwilightMod</string> | |
<key>settings</key> | |
<array> |
This file contains hidden or 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
from flask import Flask, request, redirect, url_for, \ | |
abort, render_template, flash | |
import subprocess, time | |
import win32con, win32gui, win32process | |
import os | |
from SendKeys import SendKeys | |
DEBUG = True | |
SECRET_KEY = 'blaahhasdasdasd' |
This file contains hidden or 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
public function find_by_id($id){ | |
return $this->create_object($this->_storage->fetch(new \Core\Dict(array( | |
"filters" => new \Core\Li( | |
new \Core\Filter("id", $id) | |
) | |
)))); | |
} |
This file contains hidden or 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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Michael Sheets, James Cleveland</string> | |
<key>name</key> | |
<string>TwilightMod</string> | |
<key>settings</key> | |
<array> |
This file contains hidden or 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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Michael Sheets, James Cleveland</string> | |
<key>name</key> | |
<string>TwilightMod</string> | |
<key>settings</key> | |
<array> |
This file contains hidden or 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
<pre><?php | |
class WhirlHasher { | |
protected $_strength; | |
protected $_itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; | |
public function __construct($strength=14) { | |
$this->_strength = $strength; | |
} | |
public function hash_password($password, $salt=False) { |
This file contains hidden or 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 | |
$msg = "Lorem"; | |
// Key that user inputs | |
$okey = "potato"; | |
// A slow hash is made from this key - 2^14 iterations of whirlpool. Salt is generated automatically and is about 100 characters long. | |
$hash = $hasher->hash($okey); | |
// Salt of this hash is taken and stored, so that hash can be re-created with correct original key. | |
$salt = $hasher->pull_salt($hash); | |
// Last 32 characters of hash are taken for use as actual key | |
$key = substr($hash, -32); |