Skip to content

Instantly share code, notes, and snippets.

@joshuarli
joshuarli / macos-tmux-256color.md
Created February 18, 2020 18:20 — forked from bbqtd/macos-tmux-256color.md
Installing tmux-256color for macOS

Installing tmux-256color for macOS

macOS has ncurses version 5.7 which doesn't ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color you can use screen-256color, place this command into your ~/.tmux.conf.

set-option -g default-terminal "screen-256color"
@lummie
lummie / gist:732b8cb0b478966b91a7f9244c7aeac7
Last active December 12, 2021 20:20
Change exif timezone with exiftool -8 hour
// I'm forever forgetting to adjust the time zone on my camera when taking pictures on vacation
// this uses the linux exiftool to adjust the timezone -8 hours for all images in a directory
exiftool "-DateTimeOriginal-=0:0:0 8:0:0" *
@campoy
campoy / letitfail.go
Last active January 6, 2024 07:26
This example shows how to have a set of goroutines running concurrently and processing requests. Panics from goroutines are recovered and the worker is restarted. You can download it and run it directly using `go run letitfail.go`
package main
import (
"bufio"
"fmt"
"os"
"time"
)
const numWorkers = 3
// original (broken) version is here: http://ivan-ghandhi.livejournal.com/942493.html
// My fix: don't treat arguments as if it were an array
// (Use Array.prototype.slice.call() to convert it)
function stacktrace() {
function st2(f) {
return !f ? [] :
st2(f.caller).concat([f.toString().split('(')[0].substring(9) + '(' + Array.prototype.slice.call(f.arguments).join(',') + ')']);
}
return st2(arguments.callee.caller);
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'
@mojombo
mojombo / vwilight.vim
Created January 26, 2011 03:23
vwilight.vim: A TRUE Twilight color theme for Vim
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
(let ((default-directory (expand-file-name "~/Dropbox/home/.emacs.d")))
(add-to-list 'load-path default-directory)
(load (expand-file-name "~/Dropbox/home/.emacs.d/subdirs.el") t t t))
(if (file-exists-p (locate-library "init"))
(load (locate-library "init") nil t nil))
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 157b2dd..f3807b7 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -1263,6 +1263,11 @@ the operating system.")
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()