This is a little script I use to avoid having to edit any files when I define a new alias.
Example usage:
$ palias g=git
This file needs to be sources from the main bash config file.
75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 7 |
<div class="check-container"><span id="check"></span></div> | |
{{#Question}} | |
<p>{{Question}}</p> | |
{{/Question}} | |
{{#Image}} | |
<p class="image">{{Image}}</p> | |
{{/Image}} |
#!/bin/bash | |
# Merges a local branch | |
set -e | |
# Needs a branch name as argument. | |
test -n "$1" || exit 1 | |
# Update master to origin. | |
git fetch --no-recurse-submodules | |
git checkout master && git merge origin/master |
This is a little script I use to avoid having to edit any files when I define a new alias.
Example usage:
$ palias g=git
This file needs to be sources from the main bash config file.
var real_docwrite = document.write, | |
body = $('body'); | |
(function insertGists(tags) { | |
var $tag; | |
if (tags.length > 0) { | |
tag = tags.shift(); | |
$tag = $(tag); | |
document.write = function(stylesheet) { | |
$('head').append(stylesheet); |
require( | |
[ | |
"views/page", | |
"Router" | |
], | |
function (pageView, Router) { | |
pageView.render(); | |
$('body').prepend(pageView.el); | |
new Router(); | |
Backbone.history.start(); |
<html> | |
<body> | |
<div dojo-type="mycorp.mywidget">testing</div> | |
<script src="/dojo/dojo.js" | |
djConfig="parseOnLoad: true"></script> | |
<script>dojo.require("mycorp.mywidget");</script> | |
</body> | |
</html> |
def asbool(s): | |
"""Simple function to convert any string into a boolean.""" | |
return str(s).lower() in ('true', '1') | |
@mount('/validate/{user_id}') | |
@validate('user_id', re='[0-9]*', convert=int, doc='An integer user id') | |
class ValidatingResource(Resource): | |
@validate('activate', convert=asbool, doc='Will aways be True or False (default False)') | |
@validate('email', re='.*@.*', doc='Must contain an @') | |
def GET(self, user_id, email, activate=False): |
#!/usr/bin/env python | |
""" | |
echo web service: this is a simple WsgiService example. | |
""" | |
import datetime | |
from wsgiservice import Resource, get_app, mount, validate, expires | |
@mount('/echo') | |
class EchoResource(Resource): | |
"""Returns whatever the user inputs.""" |