Skip to content

Instantly share code, notes, and snippets.

@caarlos0
caarlos0 / series.sh
Created December 30, 2011 21:51 — forked from k3rn/series.sh
#!/bin/bash
###
feedurl='' #url do feed do teu tracker
series=("American.Horror.Story" "The.X.Factor") #aqui uma array com as series
dir='' #diretorio onde o teu cliente de torrent esta escutando
##
mkdir -p /tmp/torresmos/
cd /tmp/torresmos
wget $feedurl -O feed.xml -o /dev/null;
@caarlos0
caarlos0 / gist:4038792
Created November 8, 2012 13:24
list events binded to a element
$.each($('#element').data('events'), function(i, e) {
console.log(i, e);
});
@caarlos0
caarlos0 / catarinense_hack.js
Last active December 9, 2015 19:58
Permite comprar passagens de CVEL para JOI e vice-versa
/*
Instruções:
Vá até a página da catarinense, escolha a origem, se é passagem de ida e volta ou somente de ida,
escolha a data.
Copie a linha abaixo, vá até o site do catarinense, CTRL+SHIFT+I, cole
Responda 775 para JOI ou 809 para CVEL, enter, clique em "continue"
YOU GOT THAT BITCH!
*/
var destino=window.prompt('775=JOI, 809=CVEL, 912=MED');$('[name=txt_hasta]').append('<option value="' + destino + '">' + destino + '</option>').val(destino);
@caarlos0
caarlos0 / color.js
Last active December 10, 2015 14:18
document.body.innerHTML="";setInterval(function(){document.body.style.background='#'+(Math.random()*0x1000000<<0).toString(16)},50);
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@caarlos0
caarlos0 / proxies.sh
Created August 20, 2013 20:14
export all lowercase proxy environment variables to uppercase
#!/bin/bash
#
# export all lowercase proxy environment variables to uppercase.
#
for i in $(env | grep proxy | tr '[:lower:]' '[:upper:]'); do
export $i
done
@caarlos0
caarlos0 / deploy.sh
Last active December 18, 2017 01:00
Continous deploy with Jenkins and Heroku. This is the post-build script.
#!/bin/bash
#
# login in the jenkins server with:
#
# heroku login
# heroku keys:add
#
# Doing so, jenkins will have permission to deploy to
# the heroku remote.
#
#!/bin/bash
airmon-ng start wlan0
airbase-ng -e " ̷̴̐خ ̷̴̐خ ̷̴̐خ امارتيخ ̷̴̐خ" -q -c 11 mon0

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables