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/zsh | |
Q=$(curl -s "http://www.quotationspage.com/random.php3" | grep -m 1 "dt ") | |
TXT=$(echo "$Q" | sed -e 's/<\/dt>.*//g' -e 's/.*html//g' -e 's/^[^a-zA-Z]*//' -e 's/<\/a..*$//g') | |
W=$(echo "$Q" | sed -e 's/.*\/quotes\///g' -e 's/<.*//g' -e 's/.*">//g') | |
echo "\e[0;33m${W}\033[0\e[0;30m: \e[0;35m“${TXT}”\e[m" |
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
#pragma once | |
#include <SFML/Graphics/Text.hpp> | |
#include <SFML/System/Clock.hpp> | |
#include <sstream> | |
class FPS : public sf::Text { | |
sf::Clock myClock; | |
unsigned int mySteps; |
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
CXX = g++ | |
OBJ = obj | |
SRC = src | |
BIN = bin | |
STD := -std=c++0x | |
EXT_IL := -I$(SRC) | |
MAIN := Test | |
TEST_DIR := tests |
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
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'https://vim.googlecode.com/hg/', :revision => '6c318419e331' | |
version '7.3.515' | |
def features; %w(tiny small normal big huge) end | |
def interp; %w(lua mzscheme perl python python3 tcl ruby) end | |
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/bash | |
# local-ping | |
# Simple script to check for reachable addresses in a local network | |
# Base IP for the local network. It an also be a 10.0.0 or anything else | |
BASE_IP=192.168.1. | |
# Wait time. Usually between 1 and 3 | |
WAIT=2 | |
# Number of packets to send | |
COUNT=3 |
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/bash | |
good() { | |
echo "[32m$@[0m" | |
} | |
msg() { | |
echo "[34m$@[0m" | |
} |
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/bash | |
# Open multiple files in vim | |
# Every hpp, cpp couple is opened in a separted tab | |
# by Eduardo San Martin Morote aka Posva | |
# http://posva.net | |
HPP="hpp" | |
CPP="cpp" | |
function _set_T() { |
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
set-window-option -g utf8 on | |
set-window-option -g mode-keys vi | |
set -s escape-time 0 | |
setw -g window-status-current-attr underscore | |
set-option -g default-terminal "screen-256color" | |
set-option -g status-interval 5 | |
set -g pane-active-border-fg white |
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
var diff = function(a, b) { | |
var c = [], dels = [], delsIndex = []; | |
var i = 0, j = 0, k, | |
x, y, z; | |
var t = 0; //debug | |
while (i < a.length || j < b.length) { | |
x = a[i]; | |
y = b[j]; | |
t++; |
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
" fill rest of line with characters | |
function! FillLine( str, l ) | |
" strip trailing spaces first | |
.s/[[:space:]]*$// | |
" calculate total number of 'str's to insert | |
let reps = (a:l - col("$")) / len(a:str) | |
" insert them, if there's room, removing | |
" trailing spaces (though forcing | |
" there to be one) | |
if reps > 0 |
OlderNewer