Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@konfou
konfou / mkvextract-helper.sh
Last active March 3, 2024 15:29
extract all tracks/attachments/chapters from an mkv file
#!/usr/bin/env bash
#
# Extract all tracks/attachments/chapters from an mkv file.
# depends
type -p mkvmerge &>/dev/null || exit 3
type -p mkvextract &>/dev/null || exit 3
# trap SIGINT
trap 'trap - INT; kill -s INT "$$"' INT
@konfou
konfou / cbr2cbz.sh
Last active May 16, 2017 12:04
convert *.cbr to *.cbz
#!/usr/bin/env bash
#
# Convert cbr files to cbz.
# depends
type -p 7z >/dev/null || exit 3
# trap SIGINT
trap 'trap - INT; kill -s INT "$$"' INT
@konfou
konfou / csv2tex.sh
Created May 16, 2017 11:59
convert *.csv to a TeX table
#!/usr/bin/env bash
#
# Convert CSV file(s) to a TeX table.
# trap SIGINT
trap 'trap - INT; kill -s INT "$$"' INT
caption="Πειραματικά δεδομένα."
label_template="tab:"
out_template="tab-"
@konfou
konfou / sf-cvs2git.sh
Last active May 16, 2017 11:58
cvs.sourceforge-to-git
#!/usr/bin/env bash
#
# Convert a Sourceforge's CVS repo to Git.
# depends
type -p rsync >/dev/null || exit 3
type -p cvs2git >/dev/null || exit 3
# trap SIGINT
trap 'trap - INT; kill -s INT "$$"' INT
#!/usr/bin/env python
# shitty way of doing a Lagrange interpolation
def lagint(xarr,yarr):
p = []
k = len(xarr) # rank+1
for i in range(k):
Li = []
for j in range(k):
if (j != i):
@konfou
konfou / d34dc0d3.py
Created March 28, 2017 12:54
5.9.247.121
#!/usr/bin/env python
import requests
from bs4 import BeautifulSoup
from re import findall
url = 'http://5.9.247.121/d34dc0d3'
headers = { 'X-0x0ACE-Key' : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' }
# key to be taken by previous challenge on 80.233.134.210
def solve(bgn,end):
@konfou
konfou / andro_info.sh
Created September 13, 2015 18:11
Android Device Specifications
#! /bin/bash
if ! type adb; then
echo "adb not found"
echo "check PATH"
else
echo "============================"
echo "Android Device Specificatios"
echo "============================"
adb wait-\for-device
echo "> Manufacturer"
@konfou
konfou / vbox.desktop
Created September 3, 2015 16:56
vbox.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=$vb_name
Comment=Starts the VirtualBox machine $vb_name
Type=Application
Exec=/usr/lib/virtualbox/VirtualBox --comment $vb_name --startvm $vb_uuid
Icon=virtualbox-vbox.png
@konfou
konfou / fs_fb_pic.js
Created August 8, 2013 17:19
Bookmarklet that turns an opened Facebook picture to its full size.
javascript:location.href=window.location.href.replace(/\/s\d{3}x\d{3}\//g,%20"/");
@konfou
konfou / OmniCode
Created July 24, 2013 11:32
An alternative to Geek Code, by Greg Webster (see README.md).
OmniCode! version 0.1.7
Description for the New Net
All codes are built in the following way:
[code symbol][attribute].[modifier].[modifier].[modifier]...
or for multiple codes:
[code symbol][attribute].[modifier]&[attribute].[modifier]...