Skip to content

Instantly share code, notes, and snippets.

"dependencies": {
"async": "^0.9.0",
"backbone": "~1.1.2",
"backbone-undo": "^0.2.1", // Форкнул. Автор принял PR и я вернулся на официальную версию
"debounce": "0.0.3",
"extend": "~1.2.1",
"jade": "~0.35.0",
"jquery": "~2.1.0",
"jquery-form": "git://github.com/shuvalov-anton/form", // Форкнул, жду пока автор пример PR
"jquery-mousewheel": "~3.1.11",
@A
A / ie-curl.sh
Last active August 29, 2015 14:05 — forked from oranblackwell/ie-curl.sh
#IE6 - XP
curl -O -L "http://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE6-WinXP&parts=0&filename=VMBuild_20131127/VirtualBox/ls/Mac/IE6.WinXP.For.MacVirtualBox.sfx"
#IE8 – XP
curl -O -L "http://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE8-WinXP&parts=2&filename=VMBuild_20131127/VirtualBox/IE8_WinXP/Mac/IE8.WinXP.For.MacVirtualBox.part{1.sfx,2.rar}"
#IE7 – Vista
curl -O -L "http://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE7-Vista&parts=4&filename=VMBuild_20131127/VirtualBox/IE7_Vista/Mac/IE7.Vista.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar}"
#IE8 – Win7
@A
A / commonjs.md
Last active August 29, 2015 14:05

CommonJS

This is a post for those, who feels that Sprockets is not enough to structure his JS in a Rails app. If you’re not satisfied with #= require and window.Global mess, come under the cut.

CommonJS modules are a way of encapsulating and packaging up JavaScript files to ensure they’re name-spaced and loosely coupled, a crucial aspect to ensuring JavaScript code quality and maintainability.

{
"browser": true,
"curly": true,
"expr": true,
"indent": false,
"laxbreak": true,
"maxcomplexity": 10,
"maxdepth": 3,
"maxparams": 4,
"trailing": true,
@A
A / lead-zero.js
Created August 25, 2014 08:57
Add leading zeros to number
var addLeadingZero = function (pos) {
pos = pos + '';
while (position.length < 3) {
position = '0' + position;
}
return pos;
}
@A
A / gallery.js
Last active August 29, 2015 14:05

Конфиги

Навигация

Различные способы перехода в режим вставки

i " вставить текст до курсора
@A
A / config.cson
Last active August 29, 2015 14:04
correct atom invisibles
'editor':
'showInvisibles': true
'invisibles':
'cr': '↩'
'eol': ''
'space': '·'
'tab': '⇥'
@A
A / irverbs.js
Last active August 29, 2015 14:04
// http://www.usingenglish.com/reference/irregular-verbs/
var irverbs = [];
$('.irregverbs tr').toArray().slice(1).forEach(function(e) {
var item = [];
item.push($(e).find('a strong').text());
$(e).find('td').toArray().slice(1).forEach(function(e) { item.push($(e).text()) });
irverbs.push(item);
});
console.dir(irverbs)
➜ ~ cat ~/.dotfiles/bin/dotfiles-test
#!/bin/bash
echo 'hello world'
➜ ~ echo $PATH
/usr/local/share/npm/bin/:~/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜ ~ dotfiles-test
zsh: command not found: dotfiles-test
➜ ~ bash
bash-3.2$ source .exports