Skip to content

Instantly share code, notes, and snippets.

View breck7's full-sized avatar

Breck Yunits breck7

View GitHub Profile
@breck7
breck7 / gist:e043fc3c0572c6d97154
Created January 18, 2015 00:28
package.space
name space
version 0.8.7
description A lightweight language for objects
main ./space.js
bin
space cli.js
scripts
test node tests/node-test.js
repository
type git
@breck7
breck7 / piano.space
Last active December 17, 2015 05:29
Piano demo in NudgePad.
iosViewport
content <meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" />
title
tag title
content Coming Soon
stylesheet
tag link
rel stylesheet
href site.css
dancerCode
@breck7
breck7 / blog.space
Last active December 17, 2015 03:49
simple blog template for nudgepad
title
tag title
content {{post.title Post Title}}
stylesheet
tag link
rel stylesheet
href site.css
container
style
width 90%
@breck7
breck7 / mday
Last active December 17, 2015 03:18
mothers day draft 1
title
tag title
content Coming Soon
stylesheet
tag link
rel stylesheet
href site.css
container
style
position absolute
@breck7
breck7 / mindmap.space
Last active December 17, 2015 01:39
Mind map for NudgePad
title
tag title
content Mindmap
block2
style
left 370px
top 181px
width auto
padding 15px
height auto
@breck7
breck7 / wcd
Created February 1, 2010 17:06
#!/bin/bash
echo $1
newpath=$(echo $1 | sed 's|\\|/|g' | sed 's|:||g' | sed 's|^C|/cygdrive/c|')
echo $newpath
cd "$newpath"
<?php
function post($url, $post_array)
{
// curl
}
?>
$isBot = preg_match('/(spider|crawl|curl|python|twitt|bot|google|perl|archiver|monitor|mechanize)/i',$_SERVER['HTTP_USER_AGENT']);
<?php
/*
easier way to deal with $_POST & $_GET etc: typecast it to an object.
$post = (object)$_POST;
benefits:
- quicker to type (30% faster to type $post->username than to type $_POST['username'])
- reduces chance of making syntax mistakes(you have to make sure to match 2 sets of tokens( ' and [ )in the former and 0 in the latter, reducing the likelihood of annoying syntax mistakes.