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 | |
# Based on the following script | |
# Author: Ryan Norbauer's http://norbaurinc.com | |
# Modified: Geoffrey Grosenbach http://topfunky.com | |
# Modified: Clement NEDELCU | |
set -e | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
DESC="nginx daemon" |
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 | |
# Steps are taken from http://bit.ly/12HLd0 | |
# To use, sudo priviledges are need (to copy the certificate | |
# and key to /etc/ssl/) | |
# | |
# The script has one required argument - the name of the certificate | |
# to be generated. Once the script starts running, just follow | |
# on-screen instructions. |
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() { | |
// using jQuery | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = jQuery.trim(cookies[i]); | |
// Does this cookie string begin with the name we want? | |
if (cookie.substring(0, name.length + 1) == (name + '=')) { |
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 | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch of the current git/mercurial repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
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 | |
path=$1 | |
if [ -z $path ]; then | |
path="."; | |
fi | |
# when symlinks are present -delete cannot be used | |
# by passing all found files to rm via xargs | |
# allows to remove files even inside symlinks |
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 | |
USAGE="Attach to Docker Container | |
-------------------------- | |
Attach to Docker Container even if the container does not run | |
ssh daemon. This is accomplished by using linux containers | |
directly via 'nsenter' (see http://bit.ly/docker_nsenter). | |
To install 'nsenter', just execute: | |
$ docker run -v /usr/local/bin:/target jpetazzo/nsenter |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
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 | |
# install stable nginx | |
# even though nginx will be replaced | |
# by compiling from source | |
# this installs latest versions | |
# of required libs | |
add-apt-repository -y ppa:nginx/stable \ | |
&& apt-get update \ | |
&& apt-get install -y nginx \ |
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
--- import datetime | |
+++ (clipboard) | |
@@ -113,7 +113,22 @@ | |
for val in six.itervalues(self.query.extra_select): | |
params.extend(val[1]) | |
- result = ['SELECT'] | |
+ result = [] | |
+ | |
+ is_subquery = False |
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.color import no_style | |
from django_extensions.management.shells import import_objects | |
locals().update(import_objects({'dont_load': []}, no_style())) |
OlderNewer