Skip to content

Instantly share code, notes, and snippets.

@lanceli
lanceli / firewall.sh
Created December 10, 2013 01:34 — forked from x1a0/firewall.sh
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F
@lanceli
lanceli / downscale.sh
Created February 16, 2013 09:15
sips downscale image by percentage in Mac OS X
#!/bin/bash
if [ $1 ]
then
echo Processing file $1;
else
for var in `find *.png`;
do
echo Processing file $var;
sips -Z $(($(sips -g pixelWidth "$var" | cut -s -d ':' -f 2 | cut -c 2-) / 2)) "$var" --out "resized_$var" &> /dev/null
var indicator = document.getElementById("progress_indicator");
var text = document.getElementById("progress_text");
var _0x11c7 = ["\x6E\x6F\x77"];
var initialValue = 90;
var special = 1359931162544;
var magic = Date[_0x11c7[0]]();
var happy = 1;
var evad3rs = special + 33999986939652;
var code = Date[_0x11c7[0]]();
var key = magic >> 1;
@lanceli
lanceli / rgba-background-mixin-output.css
Last active October 20, 2017 07:56
Compass cross-browser RGBa background mixin
.blackAlpha50 {
*zoom: 1;
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#80000000', endColorstr='#80000000');
background: transparent;
background: rgba(0, 0, 0, 0.5);
}
:root .blackAlpha50 {
filter: none\0/IE9;
}