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
/*** | |
* This is an example Stackfile | |
*/ | |
/* PATHS */ | |
var jsPath = "js", | |
cssPath = "css", | |
lessPath = "less"; | |
/* PATHS */ |
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
# | |
# gmail_to_post.py | |
# FrenzyLabs, llc (@frenzylabs) | |
# | |
# Created by Wess Cope (@wesscope) on 2011-12-08. | |
# Copyright 2011 FrenzyLabs, llc. All rights reserved. | |
# | |
# Using: | |
# Python 2.7 | |
# Requests: http://python-requests.org |
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
class User(BaseModel): | |
username = models.CharField(max_length=20) | |
password = models.CharField(max_length=20) | |
groups = models.ManyToManyField('Group', related_name='groups', db_table='USERS_TO_GROUPS') | |
class Group(BaseModel): | |
name = models.CharField(max_length=20) | |
users = ManyToManyField(User, related_name='users', db_table=u'USERS_TO_GROUPS') |
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
def decorator_here(func): | |
def wrapper(func): | |
x = func() | |
return "%s , goodbye world" | |
return wrapper | |
@decorator_here | |
def testing(): | |
return "hello world" |
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 | |
class AppView | |
{ | |
private $settings; | |
private $templateDirectory; | |
private $template; | |
private $ext; | |
private $layout; | |
private $pageVars = array(); | |
private $post = 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
- (void) awakeFromNib | |
{ | |
[super awakeFromNib]; | |
CDTest_AppDelegate *appDelegate = (CDTest_AppDelegate *)[[NSApplication sharedApplication] delegate]; | |
NSManagedObjectContext *context = [appDelegate managedObjectContext]; | |
Account *account = (Account *)[NSEntityDescription insertNewObjectForEntityForName:@"Account" inManagedObjectContext:context]; | |
account.username = @"wess"; |
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
(function() { | |
var http = require('http'), | |
fs = require('fs'), | |
url = require('url'), | |
conf = require('./conf').FosterConfig; | |
var server = http.createServer(); | |
server.addListener('request', function(data, response){ | |
if(data.url !== '/favicon.ico') |
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
<script type="text/javascript" charset="utf-8"> | |
;(function($){ | |
var views = {}; | |
views.FULL_WIDTH = "100%"; | |
views.__builder = Class.extend({ | |
init: function(options) | |
{ | |
this.styles = options.styles || false; | |
this.classes = options.classes || 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
C++: | |
void Blah(int &someint) | |
{ | |
someint++; | |
} | |
void playWithBlah() | |
{ | |
int x = 0; | |
Blah(x); |
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
(function(){ | |
var conf = new Configure(); | |
conf.verbose(true); | |
conf.compiler('gcc'); | |
conf.includes(['src/headers', 'deps/v8/include']); | |
conf.libs(['deps/v8/libv8.a']); | |
conf.flags(['lpthread', 'g']); | |
conf.src(['src/bob.cc', 'src/configure.cc', 'src/environment.cc', 'src/filesys.cc', 'system.cc', 'utils.cc']); | |
conf.target('build/bob'); |