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:
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:
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python (Updated for Python 3.7) | |
Usage: | |
./dummy-web-server.py -h | |
./dummy-web-server.py -l localhost -p 8000 | |
Send a GET request: |
/* | |
|-------------------------------------------------------------------------- | |
| UItoTop jQuery Plugin 1.2 by Matt Varone | |
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/ | |
|-------------------------------------------------------------------------- | |
*/ | |
(function(a){a.fn.UItoTop=function(d){var f={text:"To Top",min:200,inDelay:600,outDelay:400,containerID:"toTop",containerHoverID:"toTopHover",scrollSpeed:1200,easingType:"linear"},e=a.extend(f,d),c="#"+e.containerID,b="#"+e.containerHoverID;a("body").append('<a href="#" id="'+e.containerID+'">'+e.text+"</a>");a(c).hide().on("click.UItoTop",function(){a("html, body").animate({scrollTop:0},e.scrollSpeed,e.easingType);a("#"+e.containerHoverID,this).stop().animate({opacity:0},e.inDelay,e.easingType);return false}).prepend('<span id="'+e.containerHoverID+'"></span>').hover(function(){a(b,this).stop().animate({opacity:1},600,"linear")},function(){a(b,this).stop().animate({opacity:0},700,"linear")});a(window).scroll(function(){var g=a(window).scrollTop();if( |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source) | |
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git | |
2. If your local GIT repo is already set up, skips steps 2 and 3 | |
3. Locally, at the root directory of your source, git init | |
4. Locally, add and commit what you want in your initial repo (for everything, | |
git add . |
# -*- coding: utf-8 -*- | |
# ############################################################################ | |
# This example demonstrates how to use the MultipartEncoderMonitor to create a | |
# progress bar using clint. | |
# ############################################################################ | |
from clint.textui.progress import Bar as ProgressBar | |
from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor |
########################################################################### | |
# | |
## @file database.py | |
# | |
########################################################################### | |
import sqlite3 | |
########################################################################### | |
# |
// original from:https://codepen.io/mdd/pen/wGRqbw | |
// Reducer | |
const counter = (state = 0, actions) => { | |
switch (actions.type) { | |
case 'INCREMENT': return state + 1; | |
case 'DECREMENT': return state - 1; | |
default: return state | |
} | |
} |
#!/bin/bash | |
# Forticlient SSL VPN Client launching script utilizing expect. | |
# -------------------------------------------- | |
# CONFIGURATION | |
# If empty - script will take some simple logic to locate appropriate binary. | |
FORTICLIENT_PATH="" |