This file contains 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
changelog_entry() { | |
# Output individual changelog entry | |
usage="changelog_entry <since> <until>" | |
since=${1} | |
until=${2} | |
if [ "${since}" == "" ] ; then | |
echo "No 'since' version" | |
echo ${usage} | |
return 1 |
This file contains 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
angular.module('ie8debug').factory('prepend', [ | |
'$rootScope', | |
'$compile', | |
function($rootScope, $compile) { | |
return function (template, context) { | |
var scope = $rootScope.$new(true); | |
angular.extend(scope, context); | |
angular.element(document).find('body').prepend( | |
$compile(template)(scope) | |
); |
This file contains 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
# Reduce screen : 72dpi | |
mkdir -p _72dpi | |
cd _Cropped; | |
find . -name \*.pdf|while read file; do | |
src="$file"; | |
dst="../_72dpi/$src" | |
if [[ $dst != */_old/* ]] ; then | |
if [ ! -f "$dst" ] ; then | |
echo $dst; |
This file contains 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
#!/bin/bash | |
root=$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd) | |
usage=" | |
Usage: `basename $0` [source] [ratio] | |
Generate video poster images. | |
Arguments |
This file contains 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
// Bind the local variable name to the remote variable name in the parent scope. | |
module.factory('twoWayBind', function ($parse) { | |
return function (scope, local, remote) { | |
// 2-way bind the model attribute | |
if (angular.isUndefined(remote)) { | |
remote = local; | |
} | |
var parentAssign = $parse(remote).assign; | |
var localAssign = $parse(local).assign; | |
scope.$watch(remote, function(value) { |
This file contains 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
#!/bin/sh | |
for filename in *.html ; do | |
basename="${filename%.*}"; | |
echo "$filename" | |
mkdir -p "$basename/slides"; | |
ln -s "../assets" "$basename/assets"; | |
git mv "$filename" "$basename/$filename"; | |
git mv assets/images/slides/2x/$basename* "$basename/slides/"; | |
# Thumbs |
This file contains 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
from django.core.management.base import BaseCommand | |
from django.conf import settings | |
from incuna.structure.models import Page as StructurePage | |
from feincms.module.page.models import Page as FeinPage | |
from feincms.content.richtext.models import RichTextContent | |
def migrate_pages(structure_pages, template, region, parent=None, **options): | |
""" | |
Migrate the structure pages and their children (recursively) | |
""" |
This file contains 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
[enter] | |
~ | |
. |
This file contains 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
#!/bin/bash | |
display_usage() { | |
echo -e "\nUsage: $0 [command] \n" | |
echo -e "Execute the specified command with environment variables set." | |
echo -e "If no command is specified then execute a new shell.\n" | |
} | |
if [[ ( $1 == "--help") || $1 == "-h" ]]; then | |
display_usage |
This file contains 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
exports.repositories = [ | |
{ | |
url: "https://USERNAME:PASSWORD@USERNAME.cloudant.com/DATABASE", | |
search: "https://USERNAME:PASSWORD@USERNAME.cloudant.com/DATABASE/_design/lucene/_search/jam" | |
}, | |
"http://jamjs.org/repository" | |
]; |
OlderNewer