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 | |
# muestra funciones no llamadas desde archivos de test | |
function usage() | |
{ | |
echo "usage: `basename $0` script_name.py" | |
} | |
# si no recive argumentos |
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 | |
export WORKON_HOME=~/Envs | |
mkdir $WORKON_HOME | |
source /usr/local/bin/virtualenvwrapper.sh | |
echo "hostshort=$(hostname | cut -d'-' -f3,4)" >> ~/.bashrc | |
echo 'export PS1="\[\033[01;32m\]$hostshort\[\033[00m\]:\[\033[01;36m\]\W\[\033[00m\]\$(parse_git_branch)\$ "' >> ~/.bashrc | |
echo "export WORKON_HOME=~/Envs" >> ~/.bashrc | |
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc |
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/python | |
# -*- coding: utf-8 -*- | |
from string import Template | |
import csv | |
content = Template(\ | |
'${name}:\n'+\ | |
'properties:\n'+\ | |
' ${value1}\n'+\ |
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/python | |
# -*- coding: utf-8 -*- | |
# python -m unittest test_output | |
import sys | |
import unittest | |
from StringIO import StringIO |
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){ | |
grunt.initConfig({ | |
watch: { | |
js: { | |
files : [ 'Gruntfile.js', '*/tests/*.py'], | |
tasks: ['pythontest'], | |
} | |
} | |
}); |
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){ | |
grunt.initConfig({ | |
watch: { | |
grunt: { | |
files: ['Gruntfile.js'] | |
}, | |
python: { | |
files : ['./tests/*.py','./*/*.py'], | |
tasks: ['pythontest','gitst'], | |
}, |
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
$folder = 'c:\path\to\file' | |
$filter = '*.*' | |
$fsw = New-Object IO.FileSystemWatcher $folder, $filter | |
$fsw.IncludeSubdirectories = $true | |
$fsw.NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' | |
$onCreated = Register-ObjectEvent $fsw Created -SourceIdentifier FileCreated -Action { | |
$name = $Event.SourceEventArgs.Name | |
$path = $Event.SourceEventArgs.FullPath | |
Write-Host "The file '$name' '$path'" | |
} |
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 = "pushbullet_token" | |
$url = "https://api.pushbullet.com/v2/pushes" | |
$data = "type=note&title=title&body=body" | |
$webclient = new-object System.Net.WebClient | |
$webclient.Credentials = new-object System.Net.NetworkCredential($user, "") | |
$result = $webclient.UploadString($url, "POST", $data) | |
$result |
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
$folder = 'c:\path\to\file' | |
$filter = '*.*' | |
$fsw = New-Object IO.FileSystemWatcher $folder, $filter | |
$fsw.IncludeSubdirectories = $true | |
$fsw.NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' | |
$onChanged = Register-ObjectEvent $fsw Changed -SourceIdentifier FileChanged -Action { | |
$name = $Event.SourceEventArgs.Name | |
$path = $Event.SourceEventArgs.FullPath |
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 | |
# This hook is run after every virtualenv is activated. | |
# http://virtualenvwrapper.readthedocs.org/en/latest/scripts.html | |
cur_env=$(basename $VIRTUAL_ENV) | |
cddir=$HOME/src/$cur_env | |
if [[ -e $cddir ]]; then | |
echo "cd "$cddir |
OlderNewer