This file contains hidden or 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/bash | |
# mpv-seq - Play files in a directory in order, starting from given file | |
# caveat: needs the filename as first argument, then arguments to pass to mpv | |
playlist=/var/tmp/.playlist | |
thisfile="$0" | |
qa="$1" | |
q=$(printf '%s\n' "$qa" | sed 's/[[\.*^$/]/\\&/g') | |
ext="${q##*.}" |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'niconico' | |
require 'streamio-ffmpeg' | |
require 'optparse' | |
require 'yaml' | |
# also requires danmaku2ass | |
VIDEO_URL = /https?:\/\/(?:www\.|secure\.)?nicovideo\.jp\/watch\/((?:[a-z])+?[0-9]+)/ | |
count = 1000 |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'mechanize' | |
require 'nokogiri' | |
require 'logger' | |
class Vocalyric | |
def initialize | |
@agent = Mechanize.new | |
@agent.log = Logger.new "mech.log" |
This file contains hidden or 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
pcm.!default { | |
type hw | |
card 0 | |
} | |
ctl.!default { | |
type hw | |
card 0 | |
} |
This file contains hidden or 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
-- Create animated GIFs with mpv | |
-- Requires ffmpeg. | |
-- Adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
-- Usage: "g" to set start frame, "G" to set end frame, "Ctrl+g" to create. | |
local msg = require 'mp.msg' | |
-- Set this to the filters to pass into ffmpeg's -vf option. | |
-- filters="fps=24,scale=320:-1:flags=lanczos" | |
filters="fps=15,scale=540:-1:flags=lanczos" |
This file contains hidden or 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
function lookup_jisho() | |
local text = mp.get_property("sub-text") | |
if text == "" then | |
return | |
end | |
mp.set_property("pause", "yes") | |
os.execute("open \"http://jisho.org/search/" .. text .. "\"") | |
end | |
mp.add_key_binding("Ctrl+j", "lookup_jisho", lookup_jisho) |
This file contains hidden or 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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 4.9.6 Kernel Configuration | |
# | |
CONFIG_64BIT=y | |
CONFIG_X86_64=y | |
CONFIG_X86=y | |
CONFIG_INSTRUCTION_DECODER=y | |
CONFIG_OUTPUT_FORMAT="elf64-x86-64" | |
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" |
This file contains hidden or 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
#[macro_use] extern crate hlua; | |
mod point; | |
use std::fmt::{self, Display}; | |
use hlua::Lua; | |
use point::Point; |
This file contains hidden or 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
# Requires mpv. | |
require "optparse" | |
require "find" | |
require "pathname" | |
require "ostruct" | |
require "fileutils" | |
require "io/console" | |
def is_num?(str) |
This file contains hidden or 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
local Event = Elona.require("Event") | |
local Enums = Elona.require("Enums") | |
local Item = Elona.require("Item") | |
local Chara = Elona.require("Chara") | |
local GUI = Elona.require("GUI") | |
local table = Elona.require("table") | |
local potions = {736, 711, 706, 626, 577, 566, 559, 519, 433, 432, | |
429, 382, 379, 376, 375, 372, 370, 368, 364, 287, 286, 285, 262, 76, | |
75, 74, 72, 71, 70, 69, 68, 30, 29, 28, 27} |
OlderNewer