Skip to content

Instantly share code, notes, and snippets.

@jzi96
jzi96 / PortCheck.ps1
Created October 14, 2015 08:42
Small Powershell script to check a specific port on host, if that can be accessed. (Old telnet style port check) This can be useful, if you are behind a firewall.
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
[string]$hostname,
[Parameter(Mandatory=$True,Position=2)]
[int]$port
)
try {
@jzi96
jzi96 / Git-commands-tmpl.txt
Last active February 15, 2016 07:32
Some usefull GIT commands * usage with SVN * configuration * alias
## patching
git format-patch -M origin/master
git am < patchfilename.patch
##Mirror an repository
for remote in `git branch -r | grep -v master `; \
do git checkout --track $remote ; done
git push --all ssh://repo.git
git push --tagsssh://repo.git
@jzi96
jzi96 / OracleDropSchemaContent.SQL
Created April 26, 2012 06:23
Oracle SQL script to drop the entire schema content. This is very useful right before an import (restore).
SET SERVEROUTPUT ON
exec dbms_output.enable(1000000);
DECLARE
v_typ VARCHAR2(32);
v_name VARCHAR2(32);
v_constraint VARCHAR2(32);
v_sql VARCHAR2(100);
CURSOR c_objekte IS
SELECT typ, NAME
@nolim1t
nolim1t / gist:271018
Created January 7, 2010 05:29
Sample HTTP Request in Powershell
Powershell HTTP Request
$r = [System.Net.WebRequest]::Create("http://url/")
$resp = $r.GetResponse()
$reqstream = $resp.GetResponseStream()
$sr = new-object System.IO.StreamReader $reqstream
$result = $sr.ReadToEnd()
write-host $result
Username and passwords