Skip to content

Instantly share code, notes, and snippets.

@nmcv
nmcv / JavaCandR.sublime-build
Created November 10, 2012 21:52 — forked from DevinClark/JavaCandR.sublime-build
This is a build script for Sublime Text 2 that will compile and run the open java file by simply pressing cmd + B. I am very new at Java so feel free to point out problems with this script. You can just drop this file in the User Packges folder and restar
{
"cmd": ["javac", "$file_name"],
"cmd": ["java", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "source.java"
}
@nmcv
nmcv / console.log.sublime-snippet
Created December 13, 2012 15:55 — forked from anonymous/console.log.sublime-snippet
Sublime Text 2 snippet to add console.log() quickly to your JavaScript/jQuery source code.
<snippet>
<content><![CDATA[
/* @DEBUG_START */
//console.log("$SELECTION$1");
/* @DEBUG_END */
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>@log</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
$font-size-base: 16px;
$font-size-minor: 10px;
@mixin font-size($scale: 1) {
font-size: round(
($font-size-base * ((exp(1.618, $scale) - exp(-0.618, $scale)) / 2.236)) +
($font-size-minor * ((exp(1.618, ($scale - 1)) - exp(-0.618, ($scale - 1))) / 2.236))
);
}
.gist-highlight {
border-left: 3ex solid #eee;
position: relative;
}
.gist-highlight pre {
counter-reset: linenumbers;
}
.gist-highlight pre div:before {
# Unofficial brew formula for proxychains 4
# Instruction:
# $ git clone git://gist.github.com/3792521.git gist-3792521
# $ brew install --HEAD gist-3792521/proxychains4_formula.rb
#
# The default config file will be located in /usr/local/etc/proxychains.conf
#
require 'formula'
class Proxychains < Formula
@nmcv
nmcv / ic.py
Created March 1, 2013 02:27 — forked from enigmaticape/ic.py
Calculates Index of Coincidence
#!/usr/bin/env python
import sys
import collections
# Bag em
cipher_file = open( sys.argv[ 1 ], 'rb')
cipher_text = cipher_file.read()
# remove all non alpha and whitespace and force uppercase
@nmcv
nmcv / crime.py
Created March 16, 2013 12:01 — forked from koto/crime.py
# 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 + "%/+="

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nmcv
nmcv / frameworks.md
Last active December 17, 2015 07:49 — forked from bkeepers/frameworks.md
#!/bin/bash
#
# This is an easier-to-tweak version of Steffen Honig's i3lock
# script. If it doesn't work, it's his fault ;)
#
TEMP_FILE=/tmp/lock.png
TEMP_FILE_POST=/tmp/lock.modified.png
BAR_BG_COLOR="orange"
BAR_FONT_COLOR="white"
BAR_FONT="Source-Code-Pro-Black"