Skip to content

Instantly share code, notes, and snippets.

View TRoetz's full-sized avatar

Tommie Roetz TRoetz

View GitHub Profile
@thiagozs
thiagozs / zookeeper.txt
Created September 20, 2013 18:16
Zookeeper config Step-by-step
mkdir -p /home/zilli/zookeeper/zk-server-1 \
/home/zilli/zookeeper/zk-server-2 \
/home/zilli/zookeeper/zk-server-3 \
/home/zilli/zookeeper/zk-server-4 \
/home/zilli/zookeeper/zk-server-5
mkdir -p /home/zilli/zookeeper/data/zk1 \
/home/zilli/zookeeper/data/zk2 \
/home/zilli/zookeeper/data/zk3 \
/home/zilli/zookeeper/data/zk4 \
@joey-qc
joey-qc / TSQL-to-POCO
Created September 26, 2013 06:56
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
@bhagyas
bhagyas / convert-to-ssh.sh
Last active March 17, 2021 20:29
Convert BitBucket HTTPS to SSH
#/bin/bash
#-- Author: Bhagya Silva (https://about.me/bhagyas)
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
#-- based on original code from : https://gist.github.com/m14t/3056747
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit