Skip to content

Instantly share code, notes, and snippets.

View supermomonga's full-sized avatar
🏠
Working from home

supermomonga supermomonga

🏠
Working from home
View GitHub Profile
// ==UserScript==
// @name lingr_nicovideo
// @namespace raa0121 & supermomonga
// @description lingr_nicovideo
// @include http://lingr.com/*
// @version 1
// ==/UserScript==
$(function(){
setInterval(function(){
$('.speaker[href="/bot/nicothumb"]').each(function(){$(this).parent().css('display','none')});
# -*- encoding: utf-8 -*-
require 'net/http'
require 'nokogiri'
class Hulu
def self.search query = ''
# http://www2.hulu.jp/search/suggest_html?query=moge&pgid=8&locale=ja
uri = URI 'http://www2.hulu.jp/search/suggest_html'
useragent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31'
@supermomonga
supermomonga / cyan.rb
Created April 13, 2013 15:18
cyan.rb by 兄さん
require 'fiddle/import'
module Cyan
CL_PLATFORM_VERSION = 0x0901
extend Fiddle::Importer
dlload 'opencl'
extern 'int clGetPlatformIDs(uint,intptr_t**,uint*)'
extern 'int clGetPlatformInfo(intptr_t,uint,size_t,void*,size_t*)'
num_platforms = value('uint')
clGetPlatformIDs(0,nil,num_platforms)
@supermomonga
supermomonga / cyan.py
Created April 13, 2013 15:26
cyan.py by 23
# coding=mbcs
import time
import os
import fnmatch
from ctypes import *
from ctypes.wintypes import *
class MODULEENTRY32(Structure):
_fields_ = [
('dwSize', DWORD),
require 'formula'
class MacvimKaoriya < Formula
homepage 'http://code.google.com/p/macvim-kaoriya/'
head 'https://github.com/splhack/macvim.git'
version '7.3.905'
depends_on 'cmigemo-mk'
depends_on 'ctags-objc-ja'
depends_on 'gettext-mk'
require 'Qt4'
require 'qtwebkit'
Qt::Application.new ARGV do |app|
Qt::WebView.new do |webview|
webview.load Qt::Url.new 'http://google.co.jp/'
webview.show
end
app.exec
end
@supermomonga
supermomonga / test.rb
Last active December 16, 2015 22:59
vimproc#kill() test
Signal.trap(:QUIT) do
puts "QUIT signal sent."
exit 0
end
puts "Signal.list['QUIT'] => #{Signal.list['QUIT']}"
puts "My pid is #{$$}\n"
loop do
puts 'I\'m alive!'
import java.util.ArrayList;
import java.io.*;
class Heap{
private ArrayList<Integer> nodes;
private int position;
Heap(){
this.nodes = new ArrayList<Integer>();
this.position = 0;
}
import java.util.Scanner;
class heapsort {
int parent(int i) {
// 親を添字を返す
return (i - 1) / 2;
}
int left(int i) {
NeoBundle 'thinca/vim-quickrun'
NeoBundle 'osyo-manga/quickrun-hook-u-nya-'
NeoBundle 'osyo-manga/unite-quickfix'
let g:quickrun_config = {
\ '_' : {
\ 'hook/close_unite_quickfix/enable_hook_loaded' : 1,
\ 'hook/unite_quickfix/enable_failure' : 1,
\ 'hook/close_quickfix/enable_exit' : 1,
\ 'hook/close_buffer/enable_failure' : 1,
\ 'hook/close_buffer/enable_empty_data' : 1,