Skip to content

Instantly share code, notes, and snippets.

@mono0x
mono0x / nicoalert-growl.rb
Created March 8, 2012 09:38
Niconama Alert
# -*- coding: utf-8 -*-
require 'nicoalert'
require 'ruby_gntp'
#require_relative 'webbrowser'
MAIL = ''
PASSWORD = ''
/* ==UserStyle==
@name font-face for Windows
@namespace https://gist.github.com/mono0x
@version 0.0.1
@license MIT
==/UserStyle== */
@font-face {
font-family: "MS Pゴシック";
src: local("Meiryo"), local("メイリオ"), local("MS Pゴシック");
}
/* ==UserStyle==
@name font-face for macOS
@namespace https://gist.github.com/mono0x
@version 0.0.1
@license MIT
==/UserStyle== */
@font-face {
font-family: "MS PGothic";
src: local("Hiragino Kaku Gothic ProN");
}
javascript:(function(){var w=550,h=420;window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(document.title)+"&url="+encodeURIComponent(location.href),"_blank","width="+w+",height="+h+",left="+(window.innerWidth-w)/2+",top="+(window.innerHeight-h)/2+",scrollbars=yes,resizable=yes,toolbar=no,location=yes")})()
@mono0x
mono0x / concat.cmd
Created April 16, 2018 12:55
Concat movie files using ffmpeg (for Windows)
@echo off
setlocal EnableExtensions
:genuniq
set "tmpfile=%tmp%\bat~%RANDOM%.txt"
if exist "%tmpfile%" goto :genuniq
set "output=%~dpn1_combined%~x1"
:loop
package test
import (
"crypto/rand"
"encoding/binary"
"testing"
"unsafe"
)
func BenchmarkCryptoRandRead(b *testing.B) {
require 'json'
require 'set'
require 'uri'
events = open('lib/data/sanrio_events_calendar.json') {|f| JSON.parse(f.read) }
uris = events['items'].map {|item|
URI.extract(item['description'], [ 'http', 'https' ])
}.flatten.to_set
// ==Taberareloo==
// {
// "name" : "Patches for Flickr"
// , "description" : "Patches for Flickr"
// , "include" : ["content"]
// , "match" : ["*://www.flickr.com/*"]
// , "version" : "0.0.1"
// , "downloadURL" : "https://gist.githubusercontent.com/mono0x/06ef86dbc7618d0c4082c4f34561d272/raw/patch.extractor.flickr.tbrl.js"
// }
// ==/Taberareloo==
package main
import (
"errors"
"io"
"net/url"
"regexp"
"strconv"
"strings"
"time"