Skip to content

Instantly share code, notes, and snippets.

@bakape
bakape / hideWS.user.js
Last active January 1, 2018 19:18
Hide Blocked add whitespace on gelbooru.com. Click RAW to install.
// ==UserScript==
// @name Hide Blocked add whitespace
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide Blocked add whitespace on gelbooru.com
// @author bakape
// @match https://gelbooru.com/*
// @grant none
// ==/UserScript==
@bakape
bakape / meguca.user.js
Last active August 24, 2017 06:09 — forked from an-electric-sheep/meguca.user.js
meguca multi-upload userscript - click RAW to install
// ==UserScript==
// @name meguca multi-upload
// @downloadURL https://gist.github.com/an-electric-sheep/ce0cd642b2bff8508f39931e902588b1/raw/meguca.user.js
// @namespace https://github.com/an-electric-sheep
// @description drag&drop 2 or more files onto meguca to auto-dump
// @include *://meguca.org/*
// @version 2.10
// @grant none
// @run-at document-start
// @noframes
package main
// #include "main.h"
import "C"
func main() {
println(C.ERROR_CODE == -1)
}
@bakape
bakape / _search.html
Created May 6, 2017 20:23
_search.html using quicktemplate
{% import "strconv" %}
{% code type searchField struct{
id, name string
} %}
Common search part of many pages
{% func SearchCommon(search SearchForm) %}
<select name="c" class="form-control input-sm" value>
<option value="_">All categories</option>
@bakape
bakape / gelbooru-nav.user.js
Last active March 13, 2017 19:22 — forked from an-electric-sheep/gelbooru-nav.user.js
gelbooru keyboard navigation - click on RAW link to install
// ==UserScript==
// @name Gelbooru Keyboard Navigation
// @namespace https://github.com/an-electric-sheep
// @downloadURL https://gist.githubusercontent.com/an-electric-sheep/a64fe6800ef5af8225fecac208a83387/raw/gelbooru-nav.user.js
// @include http://gelbooru.com/*
// @version 6
// @grant none
// @run-at document_start
// ==/UserScript==
@bakape
bakape / test.go
Created September 17, 2016 21:14
package main
import (
"image"
"os"
"github.com/Soreil/imager"
)
func main() {
@bakape
bakape / fizzbuzz.js
Last active June 12, 2016 19:37
Ugly functional fizzbuzz
new Array(100)
.fill(1)
.map((num, i) => i+1)
.map(num => num % 15 ? num : "FizzBuzz")
.map(num => (parseInt(num) && (num % 3 ? num : "Fizz")) || num)
.map(num => (parseInt(num) && (num % 5 ? num : "Buzz")) || num)
@bakape
bakape / gorethink_getAll_bug.go
Created June 3, 2016 09:14
Minimal reproduction conditions of a gorethink bug
package main
import (
"fmt"
r "github.com/dancannon/gorethink"
)
func main() {
session, _ := r.Connect(r.ConnectOpts{Address: "localhost:28015"})