Skip to content

Instantly share code, notes, and snippets.

@claudiodangelis
claudiodangelis / ▲▼ HN Is Down (news.ycombinator.com)
Last active December 26, 2015 23:29
▲▼ HN Is Down (news.ycombinator.com)
#!/bin/bash
MAX_DOCUMENTS=100
MAX_PAGES=300
for model in CO CR GX PX; do
mkdir out/$model
case $model in
"CO" ) GEOMETRY="left=2.9in,top=1.7in" ;;
"CR" ) GEOMETRY="left=2.9in,top=1.6in" ;;
#!/bin/sh
# -m mountpoint
# -d device
while getopts ":d:m:" opt
do
case $opt in
d)
DEVICE_TMP=$(ls /dev/disk/by-label/* | sed 's/ /\n/g'\
| grep "$OPTARG")
if [ "$DEVICE_TMP" != "" ]; then
@claudiodangelis
claudiodangelis / fixNavbarIssue.js
Created November 8, 2012 21:08
[bootstrap] fixing issue #4153 `navbar-fixed-top`
function fixNavbarIssue(){
/* Quick & dirt draft fix for the bootstrap's navbar-fixed-top issue.
Overview
When you call a given section of a document (e.g. via <a href="#section"> or domain.com/page#section1) browsers show that section at the top of window. Bootstrap's navbar-fixed-top, _since it's fixed_, *overlays* first lines of content.
This function catches all of the <a> tags pointing to a section of the page and rewrites them to properly display content.
Works fine even if a # section is called from URL.
Usage