Skip to content

Instantly share code, notes, and snippets.

/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
<html ng-app='order'>
<head>
<script src='http://localhost:3000/assets/angular.js'></script>
<script src='http://localhost:3000/assets/angular-route.js'></script>
<script src='order_app.js'></script>
</head>
<body>
<div ng-view>
stuff goes here
</div>
---
- name: Install ruby and rails dependencies
user: root_allowed_user
hosts: host
sudo: true
vars:
ruby_version: '1.9.3-p286'
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="random_aww" data-view="RandomAww"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="animalsbeingjerks" data-view="RandomAww"></div>
</li>
@chelsea
chelsea / README.md
Last active April 26, 2022 18:26
Random Aww

Description

Dashing widget to display a random cute picture from http://reddit.com/r/aww

The display of the widget is heavily based on the Image widget, however it does not prepend the src with 'assets' which allows for external images.

Settings

You can set a placeholder image in the event that reddit is down, or otherwise unresponse. This is set at the top of random_aww.rb as follows:

@chelsea
chelsea / gist:2658248
Created May 11, 2012 07:59 — forked from gabehollombe/gist:2468822
SSH tunnel between two NATed machines via a third SSH host
Useful for when you need to have two hosts talk to each other on a specific port but they're both NATed (behind routers).
For example, you want to be able to SSH into your friend's machine to pair program with them.
remote$ ssh -R 55555:localhost:22 myaccount@my_ssh_server.com
local$ ssh -L 55555:localhost:55555 myaccount@my_ssh_server.com
local$ ssh -p 55555 localhost -l remote_user
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script>
<script type='text/javascript' src='jquery.custom_radio_checkbox.js'></script>
<script type='text/javascript'>
if (typeof(loadFirebugConsole) != 'undefined') { loadFirebugConsole(); }
if (typeof(console) == 'undefined') { console = {debug: function(msg) { alert(msg); }}; }
scopes[name] = danny do |parent_scope, *args|
Scope.new(murder_danny, case options
when Hash
options
when Proc
options.call(*args)
end, &block)
end
jQuery(function ($) {
var csrf_token = $('meta[name=csrf-token]').attr('content'),
csrf_param = $('meta[name=csrf-param]').attr('content');
$.fn.extend({
/**
* Triggers a custom event on an element and returns the event result
* this is used to get around not being able to ensure callbacks are placed
* at the end of the chain.
*
$(task_parent).find('.user_select').dropdownchecklist("destroy");
$(task_parent).find(".user_select option").each( function() { $(this).attr("selected", false); });
$(task_parent).find('.user_select').dropdownchecklist();