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
/** | |
* The example of usage for [mt-downloader](https://www.npmjs.com/package/mt-downloader). | |
* | |
* ## Installation | |
* | |
* npm install mt-downloader muxer | |
* | |
* ## Usage | |
* | |
* // the URL to download from |
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 | |
#=============================================================================== | |
# | |
# FILE: getgeo.sh | |
# | |
# USAGE: ./getgeo.sh | |
# | |
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your | |
# database | |
# |
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
# Install https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc | |
# then add this to your django project settings.py | |
def show_toolbar(request): | |
""" | |
Default function to determine whether to show the toolbar on a given page. | |
""" | |
from django.conf import settings | |
# if request.META.get('REMOTE_ADDR', None) not in settings.INTERNAL_IPS: | |
# return False | |
if request.is_ajax(): |
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
[user] | |
name = Evgeny V. Generalov | |
email = [email protected] | |
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
wc = diff --staged | |
br = branch |
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
/* jslint node:true */ | |
'use strict'; | |
module.exports = function(grunt) { | |
grunt.registerTask('default', [ | |
'serve' | |
]); | |
grunt.registerTask('serve', [ |
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
// Don't forget to run the shell | |
// google-chrome --remote-debugging-port=9222 | |
var url = 'http://localhost:9000/'; | |
function startswith(str, prefix) { | |
return str.substring(0, prefix.length) === prefix; | |
} | |
var Chrome = require('chrome-remote-interface'); |
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
""" | |
Usage | |
----- | |
>>> class TestTodo(unittest.TestCase): | |
... def runTest(self): | |
... raise Todo("I need to test something") | |
Configuration |
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/dash | |
SUFFIX=$(uname -r | sed "s/^\(.*\)-\([^0-9]\+\)$/\2/") | |
GENERIC_VERSION=$(dpkg -l linux-$SUFFIX | awk '/^ii/{print $3}' | sed 's#^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\..*$#\1.\2.\3-\4#g' ) | |
CURRENT_VERSION=$(uname -r | sed "s/^\(.*\)-\([^0-9]\+\)$/\1/") | |
dpkg -l 'linux-image-*' 'linux-headers-*' \ | |
| grep -v 'linux-image-'$SUFFIX | grep -v 'linux-headers-'$SUFFIX \ | |
| grep -v $GENERIC_VERSION | grep -v $CURRENT_VERSION \ | |
| awk '/^ii/{print $2}' \ |
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 | |
# Runs guest session in the Xephyr window. | |
# | |
# Usage: | |
# $ xhost + | |
# $ sudo ./xguest | |
# | |
# Requires: | |
# Ubuntu 10.04 |
NewerOlder