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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Dropdown Test</title> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> |
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 | |
GFORTRAN_URL='http://gcc.gnu.org/wiki/GFortranBinaries#MacOS' | |
which gfortran | |
[ "$?" != "0" ] && echo "download and install gfortran from ${GFORTRAN_URL}" && exit 1 | |
# set up flags for Numpy C extentions compiling | |
export CFLAGS="-arch i386 -arch x86_64" | |
export FFLAGS="-m32 -m64" |
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 | |
# step through commits showing the commit information | |
BASE_REV=${BASE_REV:-$1}; | |
current_branch=$(git branch | grep '^*' | awk '{print $2}'); | |
for rev in $(git rev-list ${BASE_REV}..HEAD | tail -r); do | |
git checkout $rev; | |
LESS='CRSX' git show -p $rev; | |
done; |
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
### BEGIN INIT INFO | |
# Provides: your service | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: | |
# Short-Description: service description | |
### END INIT INFO |
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
#!/usr/bin/ruby | |
# | |
# Migration Tool for Redmine issue and time entry comments from SVN revisions to Git (i.e. r1234 => commit:abcdef789) | |
# ============================== | |
# (c) 2009 Christoph Olszowka & Sebastian Georgi, Capita Unternehmensberatung | |
# | |
# We used this when we migrated two of our main repositories from svn to git (see http://gist.github.com/139478) | |
# and wanted to have our revision links in Redmine reflect that change, too. | |
# |
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
# | |
# Migration tool from SVN to git | |
# ============================== | |
# (c) 2009 Christoph Olszowka, Capita Unternehmensberatung | |
# | |
# This is not meant for usage in an actual shell script - you're better off running | |
# each individual block (marked by the comments) separately and check the output to see if everything | |
# went right - this is more a writeup of the required steps so I can remember them rather than a | |
# shoot-and-forget-solution. | |
# |
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
#!/usr/bin/ruby | |
# | |
# Migration Tool for Redmine issue and time entry comments from SVN revisions to Git (i.e. r1234 => commit:abcdef789) | |
# ============================== | |
# (c) 2009 Christoph Olszowka & Sebastian Georgi, Capita Unternehmensberatung | |
# | |
# We used this when we migrated two of our main repositories from svn to git (see http://gist.github.com/139478) | |
# and wanted to have our revision links in Redmine reflect that change, too. | |
# |
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
# settings convention from: | |
# https://code.djangoproject.com/wiki/SplitSettings#SettingInheritancewithHierarchy | |
import os, pwd | |
# certain keys we want to merge instead of copy | |
merge_keys = ('INSTALLED_APPS', 'MIDDLEWARE_CLASSES') | |
def deep_update(from_dict, to_dict): | |
for (key, value) in from_dict.iteritems(): | |
if key in to_dict.keys() and isinstance(to_dict[key], dict) and isinstance(value, dict): |
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
class NotebookResource(BackboneJSResource): | |
user = fields.ForeignKey(UserResource, 'user') | |
class Meta: | |
queryset = Notebook.objects.all() | |
authentication = MULTI_AUTH | |
authorization = OwnerAuthorization() | |
# allow to list posts for this notebook |
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
function khd | |
{ | |
[ -z $1 ] && echo "No line number given" && return -1 | |
sed -i -e "${1}d" ${HOME}/.ssh/known_hosts | |
} |
OlderNewer