I hereby claim:
- I am olssonm on github.
- I am olssonm (https://keybase.io/olssonm) on keybase.
- I have a public key ASCzC811GvJdvWmN0-mAQKbO6LG3DHz0paOzwnfef4rVfwo
To claim this, I am signing this object:
add_shortcode('email', 'encodeEmail'); | |
function encodeEmail($attr) { | |
extract(shortcode_atts(array( | |
'adress' => 'nothing', | |
'text' => 'nothing', | |
), $attr)); | |
function encodeToEntity($str) { | |
$str = mb_convert_encoding($str , 'UTF-32', 'UTF-8'); | |
$t = unpack("N*", $str); |
<?php | |
/** | |
* For caching routes | |
*/ | |
Route::filter('cache', function($route, $request, $response = null) { | |
$cacheTagKey = Config::get('values.cacheKeys.tags_routes'); | |
// Do not cache if the devcookie is set | |
if(Util::testDevCookie() == false) { |
from urllib import urlopen | |
import json | |
data = urlopen('http://api.namnapi.se/v2/names.json?limit=10').read() | |
data = json.loads(data) | |
for name in data['names']: | |
print name['firstname'] | |
print name['surname'] | |
print name['gender'] |
/** | |
* Retrieve an attribute value, or a default value, depending on if attribute is set | |
* @param string $attribute name of attribute | |
* @param mixed $default the default value | |
* @return mixed the attribute | |
*/ | |
public function attr($attribute, $default = null) | |
{ | |
if (isset($this->attributes[$attribute]) && $this->attributes[$attribute] != null) { | |
return $this->attributes[$attribute]; |
<?php | |
Route::filter('auth.very_basic', function($request, $response) | |
{ | |
// Load configuration | |
$veryBasicAuthUser = 'admin'; | |
$veryBasicAuthPass = 'admin'; | |
$veryBasicAuthEnvs = array('dev'); | |
$veryBasicAuthMsg = 'Access denied'; | |
// Check if middleware is in use in current environment |
// Find the correct disk with diskutil | |
$ diskutil list | |
// Erase and format drive where "NAME" is the desired name (in capital letters) and "/dev/disk" is the target disk | |
$ sudo diskutil eraseDisk FAT32 NAME MBRFormat /dev/disk |
sed -i '' 's/DEFINER=`[^`][^`]*`@`[^`][^`]*`//g' filename.sql |
function copykey() { | |
pbcopy < ~/.ssh/id_rsa.pub | |
echo "Key copied!" | |
} |
--- | |
ip: "192.168.10.20" | |
version: 0.3.3 | |
memory: 2048 | |
cpus: 1 | |
hostname: homestead56 | |
name: homestead56 | |
provider: virtualbox | |
authorize: ~/.ssh/id_rsa.pub | |
keys: |
I hereby claim:
To claim this, I am signing this object: