As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/bash | |
# | |
# ========================================================================= | |
# Copyright 2014 Rado Buransky, Dominion Marine Media | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
function processData(input) { | |
var lines = input.split('\n'); | |
lines.forEach(function(line, i){ | |
if(i > 0 && i % 2 == 0){ //pra que isso? | |
var list = line.split(' ').map(function(x){ return parseInt(x)}); | |
if(list.length > 1){ | |
var fuckYeah = false; | |
var slicedSumLeft = 0; | |
var slicedSumRight = list.reduce(function(a,b){ return a+b }) - list[0]; // Que que faz esse reduce? Soma a parte da direita, tá bem óbvio, mas não consegui implementar em sintaxe de java 7 |
function unNestArray (nestedArray) { | |
var unnestedArray = []; | |
unnestedArray.push(nestedArray); | |
nestedArray.forEach(function (node) { | |
if (node instanceof Array) { | |
unNestArray(node, nestedArray); | |
} | |
}); |
#!/bin/bash | |
RED=$(tput setaf 1) # Just so the error message is red | |
regex="Generate a regex that matches the criteria" #regex for validation goes here | |
MESSAGE=$(echo "You need to find a way to get the message. I think pre-message or commit-message") | |
if ! [[ $MESSAGE =~ $regex ]]; then |
#!/bin/bash | |
RED=$(tput setaf 1) # Just so the error message is red | |
regex="Generate a regex that matches the criteria" #regex for validation goes here | |
MESSAGE=$(echo "You need to find a way to get the message. I think pre-message or commit-message") | |
if ! [[ $MESSAGE =~ $regex ]]; then |
#!/usr/bin/env ruby | |
# utf:8 | |
message_file = ARGV[0] | |
message = File.read(message_file) | |
$regex = /(#\d+):/ | |
if !$regex.match(message) | |
puts "\n" | |
puts "\n" |
/** | |
* Método para somar o valor de A com o valor de B.<br> | |
* Exemplo de uso deste método:<br> | |
* <pre> | |
* int a = 5; | |
* int b = 3; | |
* int soma = somaAB(a, b); | |
* </pre> | |
* No exemplo supracitado, a variável <code>soma</code> conterá | |
* o valor da soma das variáveis <code>a</code> e <code>b</code>. |