Skip to content

Instantly share code, notes, and snippets.

View BrainStone's full-sized avatar
🏳️‍🌈
#lgbt

Yannick Schinko BrainStone

🏳️‍🌈
#lgbt
View GitHub Profile
<!-- Polr, a minimalist URL shortening platform. Copyright (C) 2013-2016 Chaoyi Zha This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> <!DOCTYPE html> <html> <head> <title>CBN Link Shortener by Polr</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="csrf-token" content="BbbAL2SY4ULmADZs
@BrainStone
BrainStone / transbg.css
Created June 30, 2015 22:14
Transparent backgound texture for CSS
/* Creates that transparent background texture used by many image editing programs like gimp or PhotoShop */
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABlBMVEW/v7////+Zw/90AAAAE0lEQVR4AWOAAUYoGCCBAbcfCgBFEACB1bzUwAAAAABJRU5ErkJggg==);
@BrainStone
BrainStone / humanReadable.sh
Last active August 29, 2015 14:23
Covert bytes to a human readable format in bash
#! /bin/bash
function humanReadable {
if [ $1 -lt 1024 ]
then
printf "%4i B\n" $1
else
postfixes=(KiB MiB GiB TiB EiB PiB YiB ZiB)
bytes=$1