Skip to content

Instantly share code, notes, and snippets.

View tumugin's full-sized avatar
🤍
NEW HORIZON

tumugin tumugin

🤍
NEW HORIZON
  • Tokyo, Japan
View GitHub Profile
@tumugin
tumugin / autofollow.js
Last active December 5, 2016 03:05
自動でフォローするやつ
var ary = [];
$(".user-actions-follow-button").each(function(){if(/フォローする/.exec(this.innerText)) ary.push(this)});
(function(){
if(ary.length == 0) return;
ary[0].click();
ary.shift();
setTimeout(arguments.callee,1000);
})();
@tumugin
tumugin / batou.rb
Created August 4, 2016 14:44
pixivの罵倒少女のAPIをRubyで叩くやつ
# -*- coding: utf-8 -*-
require 'websocket-client-simple'
require 'yaml'
require 'time'
require 'json'
# http://www.pixiv.net/special/batoshojo/ の通信内容をChromeとかのDev tool使って解析して、以下の3つのパラメータを探せばおk
config = YAML.load_file('./config.yml')
UID = config['user']['uid']
TOKEN = config['user']['user_token']
#!/bin/bash
for i in *.ts
do
ffmpeg -i "$i" -y -c:v libvpx-vp9 -vf yadif=0:-1:1,decimate -pass 1 -b:v 0 -crf 33 -threads 8 -speed 4 -tile-columns 6 -frame-parallel 1 -an -f webm /dev/null
ffmpeg -i "$i" -c:v libvpx-vp9 -vf yadif=0:-1:1,decimate -pass 2 -b:v 0 -crf 33 -threads 8 -speed 1 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libopus -f webm "${i%ts}webm"
done
@tumugin
tumugin / kbc.xml
Last active April 29, 2016 18:39
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="kbc-developers/android_device_samsung_kltedcm" path="device/samsung/kltedcm" remote="github" />
<project name="kbc-developers/android_device_samsung_kltekdi" path="device/samsung/kltekdi" remote="github" />
<project name="kbc-developers/android_device_samsung_klte-common" path="device/samsung/klte-common" remote="github" />
<project name="kbc-developers/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
<project name="kbc-developers/android_device_samsung_msm8974-common" path="device/samsung/msm8974-common" remote="github" />
<project name="kbc-developers/android_kernel_samsung_klte" path="kernel/samsung/klte" remote="github" />
<project name="CyanogenMod/android_external_stlport" path="external/stlport" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
# -*- coding: utf-8 -*-
require 'fileutils'
class TermColor
class << self
# 色を解除
def reset ; c 0 ; end
# 各色
def red ; c 31; end
@tumugin
tumugin / toshin_fuck.rb
Last active November 3, 2015 16:23
東進の過去問DLサービスの問題PDFと解答PDFを自動生成するスクリプト
# encoding: utf-8
require 'nokogiri'
require 'open-uri'
require 'net/http'
require 'kconv'
require "pdf/toolkit"
#AUTH INFO
$username = "(ENTER YOUR USERNAME)"
$password = "(ENTER YOUR PASSWORD)"
#URL
#include <wiringPi.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#define MAX_TIME 85
#define DHT11PIN 5
int dht11_val[5]={0,0,0,0,0};
int res;
@tumugin
tumugin / gist:aa14915aed5af0f97f9d
Created July 5, 2015 12:49
俺的VP9エンコ設定
ffmpeg -i hogesource.hoge -vcodec libvpx-vp9 -b:v 0 -crf 32 -qmin 8 -qmax 32 -qcomp 0.5 -speed 8 -cpu-used 8 -threads 12 -quality realtime -acodec libopus hogeout.webm
#速くてかつ実用的(たぶん)
#カルマルカサークルOP映像にて176MBから66MBに圧縮できることを確認)
@tumugin
tumugin / twitter.lua
Created August 25, 2014 13:44
なうぷれTunes Lua拡張
-- Luaの初期化の時に一度だけ呼び出されます
-- Luaのスクリプトの編集の反映にはアプリケーションの再起動が必要になります
function main()
console("Lua scripting module initialized!!");
end
function OnTweet(Song, opt, isCustomTweet)
-- Song:中には曲情報が入っています。iTunesClass.csを参考に弄ってください
-- opt:ツイートです。中身を変える時はopt.Statusの中身を変更でお願いします
-- 何もしない時はとりあえずtrueを返すようになっています(falseにすると投稿自体を取り消します)
@tumugin
tumugin / mikutter_kaimei.rb
Created July 2, 2014 12:06
mikutterで改名するためのプラグイン
# -*- coding: utf-8 -*-
#設定
Plugin.create :kaimei do
on_mention do |s,ms|
ms.each do |m|
if Time.now - m.message[:created] < 5 then
if m.message.to_s =~ /[((][@@]#{Service.primary.user}[))]\Z/ then
if m.from_me? or (UserConfig[:kaimei_enable] and (UserConfig[:kaimei_require_approve] or ::Gtk::Dialog.confirm("この改名リクエストを受理しますか?\n\n#{m.message.to_s}"))) then
rename = m.message.to_s.gsub(/[((][@@]#{Service.primary.user}[))]\Z/,"")