Skip to content

Instantly share code, notes, and snippets.

View arozwalak's full-sized avatar

Artur Rozwalak arozwalak

View GitHub Profile
@arozwalak
arozwalak / tmux-iterm2.md
Created January 10, 2018 10:22 — forked from royling/tmux-iterm2.md
tmux in iTerm2 cheatsheet
@arozwalak
arozwalak / tmux-cheatsheet.markdown
Created September 1, 2017 14:17 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@arozwalak
arozwalak / tmux.md
Created September 1, 2017 14:01 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@arozwalak
arozwalak / jshint
Last active March 9, 2017 21:53
Javascript: .jshint config file
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
@arozwalak
arozwalak / script.js
Last active March 9, 2017 21:54
Javascript: viewport width and height
function viewport () {
var e = window, a = 'inner';
if (!('innerWidth' in window )) {
a = 'client';
e = document.documentElement || document.body;
}
return { width : e[ a+'Width' ] , height : e[ a+'Height' ] };
}
@arozwalak
arozwalak / canvasCreateLinearGradient.txt
Last active August 29, 2015 13:57
Sublime: Canvas CreateLinearGradient Snippet
<snippet>
<content><![CDATA[
createLinearGradient(${1:startX}, ${2:startY}, ${3:endX}, ${4:endY});
]]></content>
<tabTrigger>lg</tabTrigger>
<description>createLinearGradient()</description>
</snippet>
@arozwalak
arozwalak / canvasCreateRadialGradient.txt
Last active August 29, 2015 13:57
Sublime: Canvas CreateRadialGradient Snippet
<snippet>
<content><![CDATA[
createRadialGradient(${1:startX}, ${2:startY}, ${3:startRadius}, ${4:endX}, ${5:endY}, ${6:endRadius});
]]></content>
<tabTrigger>rg</tabTrigger>
<description>createRadialGradient()</description>
</snippet>
@arozwalak
arozwalak / canvasFillStyle.txt
Last active August 29, 2015 13:57
Sublime: Canvas FillStyle Snippet
<snippet>
<content><![CDATA[
fillStyle = "${1:#000000}";
]]></content>
<tabTrigger>fs</tabTrigger>
<description>fillStyle</description>
</snippet>
@arozwalak
arozwalak / canvasFillText.txt
Last active August 29, 2015 13:57
Sublime: Canvas FillText Snippet
<snippet>
<content><![CDATA[
fillText("${1:text}", ${2:startX}, ${3:startY});
]]></content>
<tabTrigger>ft</tabTrigger>
<description>fillText</description>
</snippet>
@arozwalak
arozwalak / canvasGetContext.txt
Last active August 29, 2015 13:57
Sublime: Canvas GetContext Snippet
<snippet>
<content><![CDATA[
getContext("${2:context}");
]]></content>
<tabTrigger>gc</tabTrigger>
<description>getContext()</description>
</snippet>