Skip to content

Instantly share code, notes, and snippets.

View Donearm's full-sized avatar
Coffee and cigars

Gianluca Fiore Donearm

Coffee and cigars
View GitHub Profile
@Donearm
Donearm / github-emoji.md
Created August 19, 2018 16:54 — forked from mattmc3/github-emoji.md
GitHub emoji
@Donearm
Donearm / Makefile
Last active April 1, 2018 21:43
Makefile for personal blog
PELICAN=pelican
PELICANOPTS=--ignore-cache
ifneq ($(wildcard /mnt/c/Projects/donearm.github.com),)
BASEDIR=/mnt/c/Projects/donearm.github.com
else
BASEDIR=/mnt/documents/c/Projects/donearm.github.com
endif
SOURCEDIR=$(BASEDIR)
CONFFILE=$(SOURCEDIR)/pelican.conf.py
@Donearm
Donearm / output_html.lua
Created June 2, 2013 07:42
Quick and simple Markdown to Html conversion for my extremely raw personal wiki
#!/usr/bin/env lua
---
-- @author Gianluca Fiore
-- @copyright 2013, Gianluca Fiore <forod.g@gmail.com>
--
package.path = "/mnt/d/Script/lib/?.lua;" .. package.path
local markdown = require("markdown") -- that's the markdown.lua implementation from http://www.frykholm.se/files/markdown.lua
local lfs = require("lfs")
@Donearm
Donearm / css-stats-grep.sh
Created October 14, 2012 15:42 — forked from pjkix/css-stats-ack.sh
shell script to generate some css file statistics
#!/bin/bash
## v1.0.7
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@Donearm
Donearm / feh_or_browser.lua
Created March 30, 2012 12:50
Open a url with feh, if it leads to an image, or firefox, in all other cases
#!/usr/bin/env lua
---
-- @author Gianluca Fiore
-- @copyright 2012, Gianluca Fiore <forod.g@gmail.com>
--
--
-- Open a url with feh, if it leads to an image, or firefox, in all
-- other cases. Trivial but very useful with cli newsreaders (like
-- newsbeuter) to quickly preview images and to not have to switch to
@Donearm
Donearm / mpd-ttytter_now_playing.sh
Last active September 2, 2021 09:27
Script to capture info on currently playing song in MPD, add an (optional) prefix and/or suffix and tweet it all via TTYtter
#!/bin/sh
# Script to capture info on currently playing song in MPD, add an
# (optional) prefix and/or suffix and tweet it all via TTYtter (which
# must be of course already been configured)
#
# Dependencies: TTYtter, a MPD client that can output song info (I use
# ncmpcpp)
PREFIX='on air: ' # what should go before the now playing string
@Donearm
Donearm / netgear_telnet.py
Created May 18, 2011 13:21
Reboot, connect, disconnect and get DSL and Wifi info from a Netgear DG834GT router
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
""" Reboot, connect, disconnect and gets info about DSL and WiFi status from a Netgear DG834GT router"""
###############################################################################
# Copyright (c) 2010-2011, Gianluca Fiore
#
# 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 3 of the License, or
# (at your option) any later version.
@Donearm
Donearm / script_flash_video_save.sh
Created March 15, 2011 11:17
Save flash video from memory
#!/bin/bash
FLASHPIDS=$(pidof plugin-container)
for p in $FLASHPIDS; do
cp -b "/proc/$p/fd/"$(ls -l /proc/$p/fd | grep Flash | awk '{print $9}') ~/vid-$p.mp4
done
exit 0
@Donearm
Donearm / SI downloader
Created February 15, 2011 10:12
Being sick of having to use cache to download Sports Illustrated images, I wrote this quick script for 2011 edition (but changing models name and the '11_' string before filenames and urls will work for past and, hopefully, future editions too)
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (c) 2011, Gianluca Fiore
#
# 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 3 of the License, or
# (at your option) any later version.
#
@Donearm
Donearm / pianobar upate proxy.sh
Created February 5, 2011 12:55
Using the proxy_checker.sh script to automatically update the pianobar's config file with a working USA proxy
#!/bin/bash
# Using the proxy_checker.sh script to automatically update the
# pianobar's config file with a working USA proxy
CONFIG="${HOME}/.config/pianobar/config"
PROXYCHECK='/mnt/documents/Script/script_proxy_checker.sh'
IP=$1
PORT=$2