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 / 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']
@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 / msvcfuck.sh
Created October 29, 2016 15:18
MSVCコンパイラはクソなのでBOM無しUTF8は読めないので、BOMを付けてやる
#MSVCコンパイラはクソなのでBOM無しUTF8は読めないので、BOMを付けてやる
find -name '*.cpp' -o -name '*.h' | xargs nkf --overwrite --oc=UTF-8-BOM
--- a/src/Mayaqua/Network.c 2016-03-20 13:37:38.829534634 -0400
+++ b/src/Mayaqua/Network.c 2016-03-20 13:37:28.079218703 -0400
@@ -12981,14 +12981,7 @@
}
else
{
- if (client_tls == false)
- {
- SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_method());
- }
@tumugin
tumugin / .config
Last active December 1, 2016 16:41
OrangePiPC2 defconfig
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 3.10.65 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_NO_IOPORT=y
CONFIG_STACKTRACE_SUPPORT=y
/*
* wiringPi:
* Arduino compatable (ish) Wiring library for the Raspberry Pi
* Copyright (c) 2012 Gordon Henderson
* Additional code for pwmSetClock by Chris Hall <[email protected]>
*
* Thanks to code samples from Gert Jan van Loo and the
* BCM2835 ARM Peripherals manual, however it's missing
* the clock section /grr/mutter/
***********************************************************************
@tumugin
tumugin / build.sh
Last active December 5, 2016 08:39
gcc -I/usr/local/include -L/lib test.c -o test -lwiringPi
# -*- coding: utf-8 -*-
import wiringpi
import os
import struct
from time import sleep
wiringpi.wiringPiSetup() #setup wiringpi
i2c = wiringpi.I2C() #get I2C
dev = i2c.setup(0x40) #setup I2C device
i2c.write(dev,0x02) #HDC1000 CONFIGURATION POINTER
i2c.write(dev,0x10) #send 1byte
using Microsoft.Office.Interop.Access.Dao;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tweetinvi;
using Tweetinvi.Parameters;
// ==UserScript==
// @name pixivで即ブックマークするやつ
// @namespace http://myskng.xyz/
// @version 0.1
// @description モバイル版みたいにすぐにブックマークできるようにするやつ
// @author myskng
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js
// @resource toastr https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css
// @match http://www.pixiv.net/member_illust.php*