Skip to content

Instantly share code, notes, and snippets.

/* ==UserStyle==
@name My TweetDeck
@namespace https://gist.github.com/mono0x
@version 0.0.1
@license MIT
==/UserStyle== */
@-moz-document domain("tweetdeck.twitter.com") {
.column:first-child {
width: 400px;
}
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"
require 'open-uri'
require 'json'
require 'date'
data = JSON.parse(open('http://www.puroland.jp/api/live/get_information/?category=event&page=1&count=20').read)
#data = JSON.parse(open('information.json').read)
items = data['data'].map {|item|
public_date = Date.new(*item['public_date'].split('/').map {|i| i.to_i(10) })
require 'open-uri'
require 'nokogiri'
doc = Nokogiri::HTML(open('http://www.puroland.jp/').read)
#doc = Nokogiri::HTML(open('index.html').read)
doc.search('.todaysList .todaysItemBox').each do |item|
title = item.search('.todaysItemTitle').text
start = item.search('dl.start dd').text
p start, title