Skip to content

Instantly share code, notes, and snippets.

View sunaku's full-sized avatar

Suraj N. Kurapati sunaku

View GitHub Profile
term_.prefs_.set('color-palette-overrides', {"0":"#073642","1":"#dc322f","2":"#E4E465","3":"#b58900","4":"#268bd2","5":"#d33682","6":"#2aa198","7":"#eee8d5","8":"#002b36","9":"#cb4b16","10":"#586e75","11":"#657b83","12":"#839496","13":"#6c71c4","14":"#93a1a1","15":"#fdf6e3"});
term_.prefs_.set('background-color', '#002b36');
term_.prefs_.set('cursor-color', '#eee8d5');
term_.prefs_.set('foreground-color', '#eee8d5');
@matthewlmcclure
matthewlmcclure / less.diff
Created June 19, 2013 19:57
Add incremental search to less. 2013-06-19-02
===================================================================
RCS file: RCS/command.c,v
retrieving revision 1.92
diff -u -r1.92 command.c
--- command.c 2012/07/03 20:10:42 1.92
+++ command.c 2013/06/19 19:37:59
@@ -47,6 +47,8 @@
extern int shift_count;
extern int oldbot;
extern int forw_prompt;
@russelldavies
russelldavies / hterm_solarized.js
Last active May 7, 2021 18:31
Chrome/Chromium OS hterm and Secure Shell solarized color scheme.
// Run in the JavaScript console of the hterm browser window
// Clear all existing settings - you probably don't want to do this.
// Preferences are now stored in "chrome.storage.sync" instead of
// "window.localStorage" so if you clear your preferences the changes
// will be propagated to other devices.
//term_.prefs_.storage.clear();
var htermProfiles = [
@mislav
mislav / _readme.md
Last active April 24, 2025 10:07
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

@johnbender
johnbender / prefs.js
Created February 23, 2013 06:20
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ssokolow
ssokolow / .htaccess
Created April 1, 2012 04:59
Redirecting when the old URL may or may not support .htaccess
# The proper way to HTTP Redirect... but not all hosts listen to .htaccess (eg. GitHub Pages)
# Some hosts also provide a special redirect option in their hosting controls.
RedirectPermanent / http://www.newsite.com/
# Probably never used, but just to be thorough.
ErrorDocument 404 /404.html
@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@richo
richo / openbox_divvy.xml
Created February 29, 2012 22:03
Bindings to make window management simple in openbox
<keybind key="W-Escape">
<keybind key="q">
<action name="Close"/>
</keybind>
<!-- Keybindings for resizing, ala divvy -->
<!-- 30% -->
<keybind key="C-h">
<action name="MoveResizeTo">
<x>0</x>
<height>98%</height>
@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active June 10, 2025 18:46
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.