Skip to content

Instantly share code, notes, and snippets.

View ekisu's full-sized avatar
🎯
Focusing

Ramon Dantas ekisu

🎯
Focusing
  • São Paulo, Brazil
View GitHub Profile
@ekisu
ekisu / vo_battery.lua
Created June 27, 2015 11:39
vo_battery.lua implementation for Linux
-- If the laptop is on battery, the VO set in the config will be choosen,
-- else the one defined with „hqvo“ is used.
local hqvo = "opengl-hq:interpolation"
local utils = require 'mp.utils'
if mp.get_property_bool("option-info/vo/set-from-commandline") == true then
return
end
t = {}
t.args = {"/bin/cat", "/sys/class/power_supply/AC/online"}
res = utils.subprocess(t)
@ekisu
ekisu / peerflix-hook.lua
Created June 18, 2016 15:24
A Lua user script for mpv that allows playing of magnet links, similar to the youtube-dl hook.
local utils = require 'mp.utils'
local msg = require 'mp.msg'
-- OPTIONS
local keep_file_after_streaming = false
local peerflix = {
path = "peerflix",
searched = false
}
@ekisu
ekisu / main.go
Created May 11, 2017 20:47
Get filesizes from DHT metadata
package main;
import (
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/metainfo"
"github.com/ewhal/nyaa/config"
"github.com/ewhal/nyaa/db"
"github.com/ewhal/nyaa/model"
serviceBase "github.com/ewhal/nyaa/service"
torrentService "github.com/ewhal/nyaa/service/torrent"
import requests
from bs4 import BeautifulSoup
def parse_language(response):
return BeautifulSoup(response.text).find("html")['lang']
def open_page_accept_language():
headers = {"accept-language": "pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4"}
response = requests.get("https://sukebei.pantsu.cat", headers=headers)
return parse_language(response)
@ekisu
ekisu / README.md
Last active August 11, 2017 19:03
WebM maker
@ekisu
ekisu / gist:3c3620be4b06fa88c5ce4c51667b396e
Created October 12, 2017 18:26
ffmpeg log (-loglevel debug)
.\ffmpeg.exe : ffmpeg version N-86809-g012620a Copyright (c) 2000-2017 the FFmpeg developers
No linha:1 caractere:1
+ .\ffmpeg.exe -i '.\[HorribleSubs] Aho Girl - 02 [720p].mkv' -ss 0:02: ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ffmpeg version ...mpeg developers:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2
--enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls