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 / 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 / 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 / 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 / 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);
};
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 / .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
}
You can’t perform that action at this time.