- dir
mkdir run_date_here
cd run_date_here
mkdir pics
cd pics
#!/usr/bin/env bash | |
set -o errexit | |
set -o errtrace | |
set -o nounset | |
set -o pipefail | |
#set -o xtrace | |
## SETTINGS |
const sl = (array, extra) => { | |
extra = extra || 1; | |
console.log('-'.repeat(extra),array[0].title, array[1].title, array[2].title, array[3].title, array[4].title, array[5].title, array[6].title); | |
return array.length === 7 ? "simple slicing done" : sl(array.slice(1), extra=extra+1); | |
}; | |
const shuffleArray = arr => ( | |
arr | |
.map(a => [Math.random(), a]) | |
.sort((a, b) => a[0] - b[0]) | |
.map(a => a[1]) |
function git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (*\([^)]*\))*/\1/' | |
} | |
function markup_git_branch { | |
if [[ -n $@ ]]; then | |
if [[ -z $(git status --porcelain 2> /dev/null | tail -n1) ]]; then | |
echo -e " \001\033[32m\002($@)\001\033[0m\002" | |
else |
Yleistä:
Työkalujen lataus:
#!/bin/bash | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [ "master" == "$branch" ]; then | |
echo 'Changes pushed master.' | |
fi |
Verifying that +santeriv is my blockchain ID. https://onename.com/santeriv |
I, Santeri Vesalainen, have read and do accept the MuleSoft Contributor Agreement | |
at http://www.mulesoft.org/legal/contributor-agreement.html | |
Accepted on Wed Aug 13 2014 22:59:34 GMT+0300 (Suomen kesäaika) |
/* | |
Story goes like this : | |
4th of kind-a-thing siblings finds last thing's children 4th child and removes it and then asks her parent to make her a sibling | |
*/ | |
$("#section-5").siblings("table:nth-of-type(4)").find("tr").last().children().remove('td:nth-of-type(4)').parent().prepend('<td />') |
/** | |
* A Vaadin helper utility for getting children of Component By.type | |
* | |
* @param rootComponent - component where to start | |
* @param criteriaType | |
* @return List of components that match type | |
*/ | |
public static List<Component> getChildrenByClass(HasComponents rootComponent, final Class<?> criteriaType ) { | |
return getChildren(rootComponent,By.type(criteriaType)); | |
} |