Skip to content

Instantly share code, notes, and snippets.

Konstantinos konfou

Block or report user

Report or block konfou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@konfou
konfou / andro_info.sh
Created Sep 13, 2015
Android Device Specifications
View andro_info.sh
#! /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 / mkvextract-helper.sh
Last active Aug 8, 2019
extract all tracks/attachments/chapters from an mkv file
View mkvextract-helper.sh
#!/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 / .bash_profile.sh
Last active Jul 26, 2018 — forked from mrpoptart/.bash_profile.sh
Today, bash_profile based task logger
View .bash_profile.sh
today() {
[[ -z "$*" ]] && < ~/.today || echo "$(date +'%F %T') $*" >> ~/.today
}
View do-until.jl
"""
@do begin
body
end when condition
Macro emulating a do-until construct.
"""
@eval macro $(:do)(body, when::Symbol, condition)
quote
while true
@konfou
konfou / script.js
Last active Oct 25, 2017 — forked from vielhuber/script.js
replace all occurences in a string without regex #js
View script.js
String.prototype.replaceAll = function(foo, bar) {
return this.split(foo).join(bar);
};
@konfou
konfou / ascii.m
Last active Oct 25, 2017
display an ASCII chart (Octave)
View ascii.m
chr = char(32:127)(:);
spc = ' ' * ones(length(chr), 1);
nms = num2str([32:127](:));
tab = [nms spc chr spc];
qti = reshape(tab',length(tab)/2,[])';
disp(qti)
@konfou
konfou / README.md
Last active Sep 20, 2017
play-with-mpv youtube-dl compatible sites
View README.md

The following files have been adapted from ViewTube userscript 'protocol' [[1]] instructions. But I find no reason using such a complex script just for opening a video to mpv, so instead I opted out to using a bookmarklet. The files may be installed as follows:

user$ mkdir -p $HOME/.local/{bin,share/applications}
user$ cp notube.desktop $HOME/.local/share/applications/notube.desktop
user$ install -D -m 755 notube.sh $HOME/.local/bin/notube.sh
user$ xdg-mime default notube.desktop x-scheme-handler/notube
@konfou
konfou / lolbash.sh
Last active Aug 24, 2017 — forked from norova/lolbash.sh
gist interface doesn't allow me to paste so I post my edited version on https://gitlab.com/snippets/1672613
View lolbash.sh
# LOL!!1
alias wtf='dmesg'
alias onoz='cat /var/log/errors.log'
alias rtfm='man'
alias visible='echo'
alias invisible='cat'
alias moar='more'
alias icanhas='mkdir'
alias donotwant='rm'
alias dowant='cp'
@konfou
konfou / cbr2cbz.sh
Last active May 16, 2017
convert *.cbr to *.cbz
View cbr2cbz.sh
#!/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
convert *.csv to a TeX table
View csv2tex.sh
#!/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-"
You can’t perform that action at this time.