Skip to content

Instantly share code, notes, and snippets.

View svallory's full-sized avatar
:bowtie:
Coding like there's no tomorrow

Saulo Vallory svallory

:bowtie:
Coding like there's no tomorrow
View GitHub Profile
@svallory
svallory / gist:3246885
Created August 3, 2012 11:44
T4 Template tweak to make byte fields private and add a public bool property
void WriteProperty(CodeGenerationTools code, EdmProperty edmProperty)
{
var type = code.Escape(edmProperty.TypeUsage);
if((type == "byte" || type == "Nullable<byte>" || type == "byte?") && code.Escape(edmProperty).ToLower().StartsWith("is"))
{
var name = code.Escape(edmProperty);
name = "_" + Char.ToLower(name[0]) + name.Substring(1);
#>
private <#=type#> <#=name#> { get; set; }
@svallory
svallory / yiib.sh
Created July 11, 2012 05:39
Yii-boilerplate command
#!/bin/sh
repo="https://github.com/theblacksmith/yii-boilerplate.git"
project=""
template=""
function usage
{
echo "\nYii-boilerplate (by theblacksmith)\n\n"
echo "Usage:"
@svallory
svallory / titanium-backbone_error
Created May 28, 2012 16:16
Error when trying to install titanium-backbone
npm ERR! git clone [email protected]:trabian/stitch.git Cloning into '/tmp/npm-1338221487054/1338221492364-0.7780230774078518'...
npm ERR! git clone [email protected]:trabian/stitch.git
npm ERR! git clone [email protected]:trabian/stitch.git Permission denied (publickey).
npm ERR! git clone [email protected]:trabian/stitch.git fatal: The remote end hung up unexpectedly
npm ERR! Error: `git "clone" "[email protected]:trabian/stitch.git" "/tmp/npm-1338221487054/1338221492364-0.7780230774078518"` failed with 128
npm ERR! at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/exec.js:58:20)
npm ERR! at ChildProcess.emit (events.js:70:17)
npm ERR! at maybeExit (child_process.js:362:16)
npm ERR! at Process.onexit (child_process.js:398:5)