Skip to content

Instantly share code, notes, and snippets.

View zalew's full-sized avatar

Jakub Zalewski zalew

View GitHub Profile
@zalew
zalew / uptimecheck.py
Last active August 29, 2015 14:09
Network uptime logger made on the spot.
"""
Simple check if the office network works, written on the knee.
Requests a few websites by domain and ip an prints a colored status to the console and writes to the log.
Additionally writes an autorefresh html to have the color seen from a distance on the logging laptop.
PIP requirements: termcolor
Additional files:
@zalew
zalew / submodules-add.sh
Created September 13, 2013 16:57
Automatically add git submodules from repos in subdirectories. Usage: cd your-git-project-root ./submodules-add.sh subdirectory Note: For git>=1.8.4 the script can be simplified since you don't have to be in the tree index to run submodule add.
#!/bin/sh
for i in $(ls -d $1/*)
do
if [ -d "$i"/.git ]
then
echo $(git submodule add $(cd $i && git remote show origin | grep Fetch | awk '{print $3}') ./$i)
fi
done
@zalew
zalew / zurb-foundation-short-classes
Last active August 13, 2019 14:37
Zurb Foundation short class names
.r
@extend .row
.s1
@extend .small-1
@extend .columns
.s2
@extend .small-2
@extend .columns
.s3