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
// Extend DataTable functionality to include toCSV | |
google.visualization.DataTable.prototype.toCSV = function () { | |
var dt_cols = this.getNumberOfColumns(); | |
var dt_rows = this.getNumberOfRows(); | |
var csv_cols = []; | |
var csv_out; | |
// Iterate columns | |
for (var i=0; i<dt_cols; i++) { |
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
:: Add in your url/paths | |
SET REPO_URL=svn://mysvnhost.com/repo/ | |
SET REPO_PATH=D:\repo_backup\ | |
SET REPO_DUMP_FILE=D:\repo_backup.dump | |
SET REPO_DUMP_FILE_ARCHIVE=%date:~-4,4%%date:~-7,2%%date:~0,2%dump.7z | |
SET REPO_PATH_NUX=file:///D:/repo_backup/ | |
del %REPO_DUMP_FILE% | |
rmdir %REPO_PATH% /s/q | |
mkdir %REPO_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
#!/usr/bin/env python | |
import sys | |
from transmission import Transmission, BadRequest | |
SETTINGS = { | |
'host': '127.0.0.1', | |
'port': 9090, | |
'username': 'foo', # Comment out if no authentication is needed |
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 | |
REPOS="$1" | |
REV="$2" | |
urlencode () { | |
tab="`echo -en "\x9"`" | |
local i="$@" | |
i=${i//%/%25} ; i=${i//' '/%20} ; i=${i//$tab/%09} | |
i=${i//!/%21} ; i=${i//\"/%22} ; i=${i//#/%23} |
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
@echo off | |
:: Add in your url/paths | |
SET REPO_NAME=%1 | |
SET REPO_URL=%2 | |
SET REPO_DUMP_FILE=%REPO_NAME%.dump | |
SET REPO_DUMP_FILE_ARCHIVE=%date:~-4,4%%date:~-7,2%%date:~0,2%_%REPO_NAME%.7z | |
svnrdump dump -q %REPO_URL% > %REPO_DUMP_FILE% | |
IF %ERRORLEVEL% NEQ 0 GOTO :FAIL |
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
HWND hWnd = CreateWindow(szWindowClass, szTitle, WS_BORDER, 0, 0, 500, 100, NULL, NULL, hInstance, NULL); | |
SetWindowLong(hWnd, GWL_STYLE, WS_BORDER | WS_THICKFRAME); | |
SetWindowPos(hWnd, 0, 0, 0, 100, 50, SWP_FRAMECHANGED); |
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
mvn install:install-file -Dfile=awesome-thing-1.0.jar -DgroupId=com.mycompany -DartifactId=awesome-thing -Dversion=1.0 -Dpackaging=jar |
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
def ignore_patterns_relative(*patterns): | |
"""Function that can be used as copytree() ignore parameter. | |
Patterns used can exclude with relative path names. | |
""" | |
def _ignore_patterns(path, names): | |
ignored_names = [] | |
for pattern in patterns: | |
relative_names = [os.path.join(path, name) for name in names] | |
matched_names = fnmatch.filter(relative_names, pattern) | |
ignored_names.extend(os.path.basename(name) for name in matched_names) |
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
@echo off | |
:: Directory of Jenkins settings on server | |
SET JENKINS_DIR=/var/lib/jenkins | |
:: Directory to save the backup archives to | |
SET ARCHIVE_DIR=D:\Backups\Jenkins | |
:: PuTTY session to use for connecting to the Jenkins machine | |
SET PUTTY_SESSION=my_session | |
for /f %%i in ('plink -batch %PUTTY_SESSION% "echo $(date +%%F)"') do set DATE=%%i |
OlderNewer