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 argh | |
def do_the_thing(required_arg, optional_arg=1, other_optional_arg=False): | |
""" | |
I am a docstring | |
""" | |
print((required_arg, type(required_arg))) | |
print((optional_arg, type(optional_arg))) | |
print((other_optional_arg, type(other_optional_arg))) |
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 | |
cd /path/to/your/repo/ | |
gunzip -v < [database].sql.gz | mysql -u [mysql_user] -p[mysql_password] [database] | |
# Note: | |
# No need to have these comments in the file... | |
# This file's location @ /path/to/your/repo/.git/hooks/post-merge | |
# Be sure to make this file executable via: | |
# sudo chmod +x /path/to/your/repo/.git/hooks/post-merge |
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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
copy: { | |
build: { | |
cwd: 'source', | |
src: [ '**', '!**/*.styl', '!**/*.coffee', '!**/*.jade' ], | |
dest: 'build', |
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
<?php | |
namespace Widop\Mink\Extension; | |
/** | |
* Dictionary to manage popups. | |
* | |
* @author Benjamin Lazarecki <[email protected]> | |
*/ | |
trait PopupDictionary |
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
SELECT DISTINCT table_name, column_name, column_type | |
FROM information_schema.columns | |
WHERE table_schema = 'testing' | |
ORDER BY `columns`.`COLUMN_TYPE` ASC |
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 | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# this script will display the current version, automatically | |
# suggest a "minor" version update, and ask for input to use | |
# the suggestion, or a newly entered 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
<?php | |
use Ratchet\MessageComponentInterface; | |
use Ratchet\ConnectionInterface; | |
use Ratchet\Server\IoServer; | |
use Ratchet\WebSocket\WsServer; | |
/** | |
* chat.php | |
* Send any incoming messages to all connected clients (except sender) | |
*/ |