Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
DATA_PATH="`kde4-config --path data`"
DATA_PATH="${DATA_PATH%%:*}"
STREAM="<submenu>"
for file in "${DATA_PATH}RecentDocuments/"*; do
eval "`sed -r '/^(Icon|Name|URL|X-KDE-LastOpenedWith).*/!d; s/URL\[.[^\]]*/URL/g; s/X-KDE-LastOpenedWith/La
LastOpenedWith="${LastOpenedWith:-kfmclient open}"
STREAM="${STREAM}<action label=\"${Name}\" icon=\"${Icon}\" exec=\"${LastOpenedWith} '${URL}'\" />\n"
# echo $Icon $Name $URL
done
@underr
underr / webm.bash
Last active August 29, 2015 14:02 — forked from interjection/webm.bash
remove no audio limitation
#!/bin/bash
# webm.bash
# Requires: ffmpeg, mplayer, gawk, bc
set -o errexit
shopt -s nocaseglob
shopt -s nocasematch
# Default temporary font dir, rescursively deleted at the end
FONTDIR="$HOME/.fonts/tmp/"
@underr
underr / batch-url-status-sorter.js
Last active August 29, 2015 14:12
Read lines of a file and sort them by status (200 or 404) to files
#!/usr/bin/node
var readline = require('readline');
var fs = require('fs');
var request = require('request');
var inputFilePath = '/home/under/';
var inputFileName = '1.txt';
var output200File = 'urls-200.txt';
var output404File = 'urls-404.txt';
let barposition = "bottom"
set nohud
@underr
underr / waaai.py
Last active November 20, 2020 05:34
#!/usr/bin/python3
# -*-coding:utf-8 -*
import re, requests, sys, json, argparse
parser = argparse.ArgumentParser(description="Create a short link for given URL on waa.ai")
parser.add_argument('-c', '--custom', help='Create a custom link' +
'(must be between 5 and 30 characters long)')
parser.add_argument('-p','--private', help='Create a private link',
action='store_true')
parser.add_argument('-i', '--info', help='Get info for given url code')
var readline = require('readline');
var fs = require('fs');
var isChannel = require('is-youtube-channel')
var rl = readline.createInterface({
input : fs.createReadStream('/home/under/urls.txt'),
output: process.stdout,
terminal: false
});
@underr
underr / explode.py
Last active August 29, 2015 14:17
Termite config manager
#!/usr/bin/env python3
import os
from shutil import copyfile
from glob import glob
from mando import command, main
from subprocess import call
from time import strftime
# Handy variables
HOME = os.environ['HOME']
EDITOR = os.environ.get('EDITOR','vim')
#!/bin/bash
# exhentai image search 0.2 - reverse searches on exhentai for given image
# Requires xclip for copying into clipboard
# Copyleft 2014 - under@insicuri.net
# 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.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
@underr
underr / verdade.go
Last active August 29, 2015 14:20
verdade-chan
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
palavras := [12]string{
@underr
underr / cvip.py
Last active August 29, 2015 14:20
Client CLI para o cvip.ga
#!/usr/bin/python3
# -*-coding:utf-8 -*
"""Usage:
cvip.py list
cvip.py board <board>
cvip.py thread <board> <thread>
cvip.py post <board> <thread> <post>
cvip.py new <board> <title> <text>
cvip.py -h | --help | --version
"""