Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyLC8KPj79TWDq6+tKrNRLTS+9PacvvlSGmJ5MufP3y/iFUlnDrdfgMcK0bjQQloCnVLwHZkJ8/Z4uxFxid/nNtAove1rJF4vKaFY5G9gtx+kDlOLMOJniPjwiRu/npAY3QiSwtNgIOIukQvmoDJ7YBEe7ZLPaDhh3j20Ix+NpqTMDciJxIhpJCP/jj9uer3oe1tyezW5ZeRDYn8WnNDsvg9EoG3UeIho2WHe++fUKdntQmN+YZwtwRR5SHN11iPJtVR0TywGc00jtUtJvFlFhm6IjgUAygLZBdlpJnu5HnisWfmOy0XCcN4cqhYwsNyBF0DPH7Fif+WXrO+bqZU0Z [email protected]
#!/bin/bash
#simple script to block and unblock websites using iptables string match.
#usage:
#to block: ./iptables.sh block facebook.com
#to unblock: ./iptables.sh unblock facebook.com
if [ "$1" == "block" ]
then
iptables -A OUTPUT -p tcp -m string --string "$2" --algo kmp -j REJECT
iptables -A INPUT -p tcp -m string --string "$2" --algo kmp -j REJECT
#!/bin/bash
#Script to easily download the videos from vimcasts.org in .m4v format.
#The -P option of grep doesn't come with BSD and Solaris?
wget http://media.vimcasts.org/videos/index.json -O /tmp/index.json
mapfile -t videos < <(cat /tmp/index.json | grep -o -P '(?<=: ").*(?=",)' | grep m4v | sort -V)
for i in "${!videos[@]}"
do
wget ${videos[$i]}
done
Hit http://localhost:19999/ from your browser.
To stop netdata, just kill it, with:
killall netdata
To start it, just run it:
/usr/sbin/netdata
tmux-256color-italic|tmux with 256 colors and italic,
sitm=\ePtmux;\e\E[3m\e\\, ritm=\ePtmux;\e\E[23m\e\\,
use=screen-256color,
@Avasz
Avasz / 90-evdev-trackpoint.conf
Last active August 29, 2015 14:21
90-evdev-trackpoint.conf
Section "InputClass"
Identifier "Clickpad"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
# Synaptics options come here.
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
Option "SoftButtonAreas" "60% 0 0 40% 40% 60% 0 40%"
@Avasz
Avasz / -
Last active August 29, 2015 14:19
#!/bin/bash
echo "Link of main page: "
read main_page
curl $main_page | grep -Po '".*?"' | grep '\.mp3' | sed 's/"//g' > links.txt
num=$(cat links.txt | wc -l)
for i in $(seq "$num")
do
if [ "$i" -lt "10" ]
then
[$Version]
update_info=konsole.upd:2.9.0-global-options
[Colors]
CurrentPalette=Forty Colors
[Desktop Entry]
DefaultProfile=Shell.profile
[Favorite Profiles]
#!/bin/bash
x=$(ps -A | grep redshift)
echo $x
if [ -z "$x" ]
then
redshift &2>/dev/null
else
killall -9 redshift && redshift -x
fi
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = "2004021901";
%IRSSI = (
authors => "Stefan 'tommie' Tomanek",
contact => "stefan\@pico.ruhr.de",
name => "morse",
description => "turns your messages into morse or spelling code",
license => "GPLv2",