Skip to content

Instantly share code, notes, and snippets.

View heshed's full-sized avatar
:octocat:
happy serving

BadTimo heshed

:octocat:
happy serving
View GitHub Profile

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&staging
@heshed
heshed / karabiner.json
Last active August 13, 2018 05:29
RK61 ~/.config/karabiner/karabiner.json
{
"global": {
"check_for_updates_on_startup": false,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": true
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@heshed
heshed / 17503-eliminate-rescan.md
Created October 20, 2016 14:48 — forked from aclements/17503-eliminate-rescan.md
Preview of proposal go/golang#17503

Proposal: Eliminate STW stack re-scanning

Author(s): Austin Clements, Rick Hudson

Last updated: 2016-10-18

Discussion at https://golang.org/issue/17503.

Abstract

@heshed
heshed / thyme.sh
Created August 22, 2016 05:51
thyme.sh
#!/bin/env sh
# https://github.com/sourcegraph/thyme
# go get -u github.com/sourcegraph/thyme/cmd/thyme
# usage
# nohup bash thyme.sh > thyme.log
# create stats
# thyme show -i thyme.json -w stats > thyme.html
while true; do thyme track -o thyme.json; sleep 30s; done;
@heshed
heshed / logstash.oom
Created July 20, 2016 08:17
logstash out of memory
logstash leak
Exception in thread "[base]>worker0" java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@29d0c3d4 rejected from java.util.concurrent.ThreadPoolExecutor@3b118c0e[Terminated, pool size = 22, active threads = 0, queued tasks = 0, completed tasks = 1988]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(java/util/concurrent/ThreadPoolExecutor.java:2047)
at java.util.concurrent.ThreadPoolExecutor.reject(java/util/concurrent/ThreadPoolExecutor.java:823)
at java.util.concurrent.ThreadPoolExecutor.execute(java/util/concurrent/ThreadPoolExecutor.java:1369)
at java.util.concurrent.AbstractExecutorService.submit(java/util/concurrent/AbstractExecutorService.java:134)
at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:497)
at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:120)
at Manticore::Client.execute!(/home/deploy/program/logstash-2.2.0/vendor/bundle/jruby/1.9/gems/manticore-0.5.2-java/lib/manticore/client.rb:319)
@heshed
heshed / youtube-to-mp3
Last active September 30, 2016 10:06
youtube-to-mp3.sh
# install
# brew install ffmpeg
# https://you-get.org/#installation
you-get youtube-url
find . -type f -iname "*.webm" -exec bash -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -ab 128k -ar 44100 -y "${FILE%.webm}.mp3";' _ '{}' \;
@heshed
heshed / josa.js
Last active October 13, 2015 06:33
josa.js
var process_josa = function(str) {
var font_cho = Array(
'ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ',
'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ',
'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' );
var font_jung = Array(
'ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ',
'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ',
'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ',
@heshed
heshed / Vagrantfile.example
Last active October 4, 2015 04:16
Vagrantfile.example
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.insert_key = false
config.vm.box = "boxname"
@heshed
heshed / go-file-create.go
Last active September 8, 2015 11:13
file create example
package main
import (
"flag"
"fmt"
"log"
"os"
"runtime"
"sync/atomic"
"time"
@heshed
heshed / .zpreztorc
Created July 31, 2015 10:03
zpreztorc
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#