Skip to content

Instantly share code, notes, and snippets.

@Hebo
Hebo / stream
Created June 5, 2020 16:46
stream twitch in iina
#!/usr/bin/env python
# Usage: stream kitboga
# or stream https://www.twitch.tv/kitboga
import subprocess
import argparse
DEFAULT_QUALITY = "720p"
parser = argparse.ArgumentParser()
parser.add_argument("channel", help="Twitch channel name")
package main
import (
"testing"
"time"
)
func BenchmarkAfter(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
this.RMIFOnLoad = function(AV, AZ) {
var AT = AV.frameElement;
var AR = AT.parentNode;
var AS = AT.parentNode.parentNode;
var AW = AZ.getElementById("adDiv");
var AU;
var Aa;
AS.style.width = "auto";
AS.style.height = "auto";
AS.overrideAdObj = new Object();
@Hebo
Hebo / gist:1574133
Created January 7, 2012 07:51
postgres 9.0.4 with correct ftp link
require 'formula'
require 'hardware'
class Postgresql < Formula
homepage 'http://www.postgresql.org/'
url 'http://ftp.postgresql.org/pub/source/v9.0.4/postgresql-9.0.4.tar.bz2'
md5 '80390514d568a7af5ab61db1cda27e29'
depends_on 'readline'
depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old
<snippet>
<content><![CDATA[for (var ${20:i} = ${1:Things}.length; ${20:i} > 0; --${20:i}) {
${100:${1:Things}[${20:i}]}$0
}]]></content>
<tabTrigger>for</tabTrigger>
<scope>source.js</scope>
<description>for (…) {…} (Improved Native For-Loop)</description>
</snippet>
db.addSearch('games', 'name:Starcraft').map('Riak.mapValuesJson').reduce(RiakSort, { by: 'id', order: 'desc' }).run()
> { stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'HTTP error 500: {"error":"{\\"error\\": \\"Expression returned undefined\\", \\"lineno\\": 0, \\"source\\": \\"unknown\\"}"}',
statusCode: 500 }
@Hebo
Hebo / tvtropes.user.js
Created July 27, 2010 04:48
Modification of TVTropes spoiler display script for Google Chrome. Original at http://userstyles.org/styles/24922
// ==UserScript==
// @name TVTropes - Spoilers on Mouseover
// @description Modification of TVTropes spoiler display script for Google Chrome. Original at http://userstyles.org/styles/24922
// @match http://tvtropes.org/*
// @match https://tvtropes.org/*
// @match http://*.tvtropes.org/*
// @match https://*.tvtropes.org/*
// ==/UserScript==
(
function() {
@Hebo
Hebo / l4d2-autoexec.cfg.txt
Created June 30, 2010 16:26
Source game configurations
// Left 4 Dead 2 autoexec file
// Launch Options: -window -noborder -novid --noforcemaccel -noforcemparms -nojoy
fps_max 60
exec "netgraph.cfg" //# netgraph scoreboard script
bind "TAB" "+sb" //# scoreboard & netgraph bind (game default)
bind mouse3 slot1
bind mouse4 slot2
bind kp_multiply slot3