As configured in my dotfiles.
start new:
tmux
start new with session name:
set :application, "sprai" | |
# RVM integration | |
# http://beginrescueend.com/integration/capistrano/ | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require "rvm/capistrano" | |
set :rvm_ruby_string, "1.9.2-p290" | |
set :rvm_type, :user | |
# Bundler integration (bundle install) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
package com.derekstavis; | |
public class DigitalClock extends TextView { | |
private int hours; | |
private int minutes; | |
private int seconds; | |
private Timer clockTimer; | |
private final TimerTask clockTask = new TimerTask() { | |
@Override |
#!/bin/bash | |
# GTK+ and Firefox for Amazon Linux | |
# Written by Joseph Lawson 2012-06-03 | |
# http://joekiller.com | |
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
# chmod 755 ./gtk-firefox.sh | |
# sudo ./gtk-firefox.sh | |
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.uix.widget import Widget | |
from kivy.properties import NumericProperty, ListProperty | |
from math import sin, cos, pi | |
kv = ''' | |
BoxLayout: | |
FloatLayout: | |
RoundedBox: |
httpOnly
(and secure
to true
if running over SSL) when setting cookies.csrf
for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrfbodyParser()
and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use the defer
property and pipe()
the multipart upload stream to the intended destination.// parse a Link header | |
// | |
// Link:<https://example.org/.meta>; rel=meta | |
// | |
// var r = parseLinkHeader(xhr.getResponseHeader('Link'); | |
// r['meta'] outputs https://example.org/.meta | |
// | |
function parseLinkHeader(header) { | |
var linkexp = /<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g; | |
var paramexp = /[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g; |
def validate_cpf(cpf): | |
''' Expects a numeric-only CPF string. ''' | |
if len(cpf) < 11: | |
return False | |
if cpf in [s * 11 for s in [str(n) for n in range(10)]]: | |
return False | |
calc = lambda t: int(t[1]) * (t[0] + 2) | |
d1 = (sum(map(calc, enumerate(reversed(cpf[:-2])))) * 10) % 11 |
Arch Linux is a GNU/Linux distribution that's always in the newest version of software packages, differing it from versionated distributions as Ubuntu and Debian, which updates all package's major/minor only in new releases. Another good point of Arch is that all configurations are the default ones, so you don't get Canonical's or RedHat's opinions in your operating system.
Although, not everything is flowers. Arch's installation isn't graphical, that's why I've created dsome time ago a sequence of commands to help friends to get Arch Linux with GNOME with the setup I consider the best for everyone.
After creating a boot thumb drive and boot it (download in https://www.archlinux.org/download/)