Skip to content

Instantly share code, notes, and snippets.

View nirlanka's full-sized avatar

Nir Lanka nirlanka

  • SGX
  • Singapore
View GitHub Profile
@nirlanka
nirlanka / git-clearHistory.sh
Last active November 20, 2019 18:42 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
# Remove the history from
rm -rf .git
# recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
# push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<account>/<repo>.git
@nirlanka
nirlanka / app.js
Created November 12, 2018 14:12 — forked from aosteraas/app.js
TeamCity Discord Bot
#!/usr/bin/env node
const Discord = require('discord.io');
const teamcity = require('teamcity');
const auth = require('../auth.json');
// Create Discord Bot
const bot = new Discord.Client({
token: auth.token,
autorun: true
});
@nirlanka
nirlanka / crime.py
Last active December 20, 2015 07:59 — forked from koto/crime.py
It's not a crime to build a CRIME
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="