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 / 102_patch_file_chooser.rb
Last active February 19, 2017 15:41
暴力的なパッチ(mikutter-windows用)
module Gtk::FileChooser
alias filename_orig filename
alias filenames_orig filenames
def filename
orig_path = filename_orig
orig_path ? orig_path.tr('\\', '/') : nil
end
def filenames
diff --git core/plugin/photo/model/photo.rb core/plugin/photo/model/photo.rb
index b954ead..02c8ba7 100644
--- core/plugin/photo/model/photo.rb
+++ core/plugin/photo/model/photo.rb
@@ -21,7 +21,7 @@ module Plugin::Photo
when String
if uri.start_with?('http')
photos[uri.hash] ||= new(perma_link: uri)
- elsif uri.start_with?('/')
+ elsif uri.start_with?('/') || uri.match(/[A-Z]:\/.*/)
// ==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*
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;
# -*- 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
@tumugin
tumugin / build.sh
Last active December 5, 2016 08:39
gcc -I/usr/local/include -L/lib test.c -o test -lwiringPi
/*
* 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 / .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
--- 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 / 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