This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <boost/algorithm/string.hpp> | |
using namespace std; | |
void usage() | |
{ | |
cout << "Usage: cvstoss file.csv" << endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
showRemainingCards = True | |
def card(num): | |
if num == 1: | |
card = 'A' | |
if num >= 2 and num <= 10: | |
card = str(num) | |
if num == 11: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- README: | |
-- original version by Zehkul https://gist.github.com/Zehkul/25ea7ae77b30af959be0 | |
-- needs: yad, libnotify, imagemagick (and ytdl if you want to encode streams) | |
-- press any of alt + w, g, x or c to set the start frame | |
-- press again to set the end frame and use | |
-- alt + w to make a webm | |
-- alt + g to make a gif | |
-- alt + x to make a x264 encoded mkv | |
-- alt + c to make a direct stream copy saved into mkv (fast but start time may be off due to keyframes) | |
-- alt + 5 to make a experimental x265 encoded mkv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--makes mpv only stay on top while playing | |
--please note that this won't do anything if ontop is not enabled before pausing | |
local was_ontop = false | |
mp.observe_property("pause", "bool", function(name, value) | |
local ontop = mp.get_property_native("ontop") | |
if value == true then | |
if ontop == true then | |
mp.set_property_native("ontop", false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- README: | |
-- calls terminal and starts youtube-dl to download the video currently playing | |
local opt = require 'mp.options' | |
-- default options, .conf is read | |
local options = { | |
terminal = 'guake -t && guake -n guake -e', | |
--terminal = 'gnome-terminal -e', | |
--terminal = 'konsole -e' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--logs filename and timeposition to a history file when closing mpv | |
--needs wc for word counting | |
local msg = require 'mp.msg' | |
-- default options, .conf is read | |
local options = { | |
history_file = os.getenv("HOME") .. "/.mpv/history", | |
line_limit = 20, --set to 0 for unlimited history logging | |
--by default it will log the last 20 files | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
verbose=false | |
booru='' | |
windowed=false | |
keep=false | |
Time=30 | |
blacklist=('rating: explicit' 'rating: questionable') | |
feh_id=0 | |
files=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#creates a bootstick from archlinux based iso | |
function usage() { | |
echo "usage $0 /path/to/your_arch.iso /dev/sdX1" | |
echo "example: $0 archlinux-2015.02.01-dual.iso /dev/sdb1" | |
echo "" | |
echo "/dev/sdX needs to have an ms-dos partition table" | |
exit 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--sets the startime of a youtube video as specified in the "t=HHhMMmSSs" part of the url | |
local msg = require 'mp.msg' | |
function youtube_starttime() | |
url = mp.get_property("path", "") | |
start = 0 | |
if string.find(url, "youtu%.?be") and | |
((url:find("http://") == 1) or (url:find("https://") == 1)) then |
OlderNewer