Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@israelst
israelst / chunk_indexes.py
Last active February 3, 2019 17:02
Helper functions to data structures hacking
def chunk_indexes(size, chunk_size):
start = (size % chunk_size) or chunk_size
upper_boundary = list(range(start, size + 1, chunk_size))
lower_boundary = [0] + upper_boundary[:-1]
return zip(lower_boundary, upper_boundary)
@turicas
turicas / android-decompile.sh
Created July 9, 2015 22:33
Decompile Android from APK
#!/bin/bash
# Download dex2jar:
#URL=https://github.com/pxb1988/dex2jar/releases/download/2.0/dex-tools-2.0.zip
#wget $URL -O /tmp/dex-tools.zip
#cd /tmp
#unzip dex-tools.zip
#cd dex2jar-2.0
#chmod +x *.sh
@bobbygrace
bobbygrace / trello-css-guide.md
Last active November 3, 2024 14:56
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@flavioamieiro
flavioamieiro / gist:3682214
Created September 9, 2012 02:36
O Android organiza as fotos na galeria pela data de acesso do arquivo. Quando eu mudei o cartão SD, as fotos ficaram todas com a mesma data. Esse comando redefine a data de acesso do arquivo usando como base a data original da foto.
for FILE in `ls -1 *.jpg`;
do
touch -m -d "`exiftool -s3 -CreateDate "$FILE" -dateFormat "%Y-%m-%d %H:%M:%S"`" "$FILE"
done