This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in $(find -name \*.rb | xargs egrep -r -l '\s+$') ; do | |
sed -r -i 's/\s+$//' $f ; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have a monitor that its larger standard resolution is 1280x1024, but I wanted something like 1600x1100: | |
(In terminal) | |
1- To see your video exits type: | |
xrandr | |
in the exit I have VGA-1 and HDMI-0, I want to change the resolution of the HDMI | |
2- $ cvt 1600 1100 | |
# 1600x1100 59.89 Hz (CVT) hsync: 68.33 kHz; pclk: 146.50 MHz | |
Modeline "1600x1100_60.00" 146.50 1600 1704 1872 2144 1100 1103 1113 1141 -hsync +vsync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#just add into your bashrc: | |
# pip bash completion start | |
_pip_completion() | |
{ | |
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ | |
COMP_CWORD=$COMP_CWORD \ | |
PIP_AUTO_COMPLETE=1 $1 ) ) | |
} | |
complete -o default -F _pip_completion pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gst-launch-0.10 v4l2src ! decodebin ! xvimagesink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip doesn't have a command to update all python packages yet, so you can use the code below for now | |
# big command right? make an alias. Oh, you maybe need to put "sudo" before "pip install" | |
$ (echo pip; pip freeze | awk 'BEGIN{FS="=="}{print $1}') | xargs pip install -U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/sh | |
# CUSTOM version by Gabriel Lima (http://www.github.com/gabriellima) (@glima5) | |
# * Check portuguese (pt_BR) apt-get output | |
# * support '--force-yes' param to pass through user response | |
# * pass '-n10' to axel, to use 10 connections instead of default number | |
# * show packages installed or upgraded in the end of command execution | |
# apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source | |
# if you do anything cool with it, let me know so I can publish or host it for you |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this will try to install each package from requirements.txt | |
# if it succeed it'll save the package name in the existent.txt file. | |
# by bernardofire | |
while read line | |
do | |
pip install $line; | |
pip freeze | grep $line && echo $line >> existent.txt; | |
done < requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Udacity EXT - Auto next video&quiz | |
// @description Udacity Extension -- Automatically go to the next video or quiz question upon reaching the end of the current one | |
// @namespace http://sepczuk.com/ | |
// @version 0.2 | |
// @include http://www.udacity.com/view* | |
// @match http://www.udacity.com/view* | |
// @copyright 2012, Damian Sepczuk, Hugo Lopes Tavares // Bernardo B. Marques | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sete Atitudes para Hackear a Indústria de Software | |
By Klaus Wuestefeld | |
1) Torne-se excelente. | |
Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
anos numa faculdade ouvindo um professor falar sobre software q vc | |
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from splinter import Browser | |
class Abed(object): | |
def save_name(self, name): | |
self.open_file.write(name.encode('utf-8') + '\n') | |
def prepare(self): | |
self.browser = Browser() |
OlderNewer