Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
| package org.robotlegs.utilities.remote | |
| { | |
| import com.adobe.serializers.json.JSONDecoder; | |
| import mx.collections.ArrayCollection; | |
| public class JsonRemoteService extends RemoteServiceBase | |
| { | |
| public function JsonRemoteService(rootURL:String = "") | |
| { |
| package com.visfleet.robotlegs { | |
| import com.visfleet.core.isNotNull; | |
| import flash.events.Event; | |
| import flash.events.IEventDispatcher; | |
| import mx.logging.ILogger; | |
| import mx.logging.Log; |
| package | |
| { | |
| import flash.geom.ColorTransform; | |
| public class ColorUtil | |
| { | |
| /** | |
| * RGBColorTransform Create an instance of the information. | |
| * @ Param rgb RGB integer value that indicates (0x000000 - 0xFFFFFF) | |
| * @ Param amount of fill adaptive value (0.0 - 1.0) | |
| * @ Param alpha transparency (0.0 - 1.0) |
Some exercises from the Falsy Values workshops.
The good parts:
| virtualenv --no-site-packages . | |
| source bin/activate | |
| bin/pip install Django psycopg2 django-sentry | |
| bin/pip freeze > requirements.txt | |
| bin/django-admin.py startproject mysite | |
| cat >.gitignore <<EOF | |
| bin/ | |
| include/ | |
| lib/ | |
| EOF |
| @implementation MySharedThing | |
| + (id)sharedInstance | |
| { | |
| DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
| return [[self alloc] init]; | |
| }); | |
| } | |
| @end |
| /* | |
| * Normalized hide address bar for iOS & Android | |
| * (c) Scott Jehl, scottjehl.com | |
| * MIT License | |
| */ | |
| (function( win ){ | |
| var doc = win.document; | |
| // If there's a hash, or addEventListener is undefined, stop here | |
| if( !location.hash && win.addEventListener ){ |
| # -*- coding: utf-8 -*- | |
| """ | |
| Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html | |
| Author: Ola Sitarska <[email protected]> | |
| Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html) | |
| This script requires python-epub-library: http://code.google.com/p/python-epub-builder/ | |
| """ |
| #!/bin/sh | |
| # install_tmux_centos6.sh | |
| # Make sure we have the deps | |
| yum -y install gcc kernel-devel make ncurses-devel | |
| # Get libevent and tmux source, and put it all under /usr/local/src | |
| # and then untar it all, and config/compile/install them. | |
| mkdir -p /usr/local/src/libevent | |
| mkdir -p /usr/local/src/tmux |