Skip to content

Instantly share code, notes, and snippets.

View jProgr's full-sized avatar
🦉
Who

Cristóbal jProgr

🦉
Who
View GitHub Profile
@jProgr
jProgr / stringtolist.py
Created August 11, 2016 21:29
String of integers separated by spaces to a list of int
x='4 51 1 3'
a=list(map(int,x.split(' ')))
print(a)
#!/bin/bash
i=( 'one' 'two' {3..5} 'six' )
for val in {0..5}
do echo ${i[$val]}
done
j[4]='bar'
j[12]='foo'
@jProgr
jProgr / ceiling.sh
Last active August 11, 2016 21:27
Ceiling function for divisions
#!/bin/bash
# Ceiling function for divisions
let a=($1+$2-1)/$2
echo $a