Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
| /* | |
| * ver0.1 殴り書き | |
| * ver0.2 半角スペースを含んでいる場合に、別の文節として処理できるように修正 | |
| * ver0.3 課題を模索中 | |
| * ver0.4 リファクタリング & エスケープ処理以外はほぼ完成 | |
| * ver0.5 HTML用エスケープ処理を実装 & テストコード拡充 | |
| */ | |
| public class Autolink { | |
| /* |
| function convertWithLang(timeAgo, lang) { | |
| if (lang == "ja") | |
| return toJa(timeAgo); | |
| return timeAgo; | |
| } | |
| function convert(timeAgo, dict, strip) { | |
| var delim = " "; | |
| var arr = timeAgo.split(delim); |
Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #! /bin/sh | |
| for x | |
| do | |
| echo "Converting $x" | |
| tr -d '\015' < "$x" > "tmp.$x" | |
| mv "tmp.$x" "$x" | |
| done |
| #!/bin/sh | |
| # | |
| # To enable this hook, rename this file to "pre-commit". | |
| PRY_PATTERN="require.+[\'\"]pry[\'\"]|binding\.pry" | |
| # Redirect output to stderr. | |
| exec 1>&2 | |
| if git diff --cached | grep '^\+' | grep -q -E $PRY_PATTERN; then | |
| echo "ERROR: There is left over pry stuff in this commit" |
| %package com.example.fsm.gen | |
| %import com.exapmle.fsm.TodoAction | |
| %class TodoAction | |
| %fsmclass TodoFsm | |
| %start TodoStateMap::IDLE | |
| %map TodoStateMap | |
| %% |
| #!/usr/bin/python | |
| # Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
| # The author disclaims copyright to this source code. | |
| # | |
| # Modified slightly by Andreas Thienemann <[email protected]> for clearer exploit code | |
| # and 64k reads | |
| # | |
| # This version of the exploit does write received data to a file called "dump" in the local directory | |
| # for analysis. |
| import code; code.interact(local=dict(globals(), **locals())) |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm