Skip to content

Instantly share code, notes, and snippets.

@A
A / config.cson
Last active August 29, 2015 14:04
correct atom invisibles
'editor':
'showInvisibles': true
'invisibles':
'cr': '↩'
'eol': ''
'space': '·'
'tab': '⇥'

Конфиги

Навигация

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

i " вставить текст до курсора
@A
A / gallery.js
Last active August 29, 2015 14:05
@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;
}
{
"browser": true,
"curly": true,
"expr": true,
"indent": false,
"laxbreak": true,
"maxcomplexity": 10,
"maxdepth": 3,
"maxparams": 4,
"trailing": true,
@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.

@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
"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 / bash.sh
Created August 30, 2014 13:45
[root@12time ~]# cat ./start_node
#!/bin/bash
export NODE_ENV=development
export MONGODB=0.0.0.0/justchat-prod
export HOST=82.146.58.73
export PORT=800
export PWD=/www/project
supervisor /www/project/app.js
[root@12time ~]# ./start_node

Раздражает, что я ничего не могу сделать с треками, которые мне не нравятся в стриме sc. Их можно скрывать так

Можно плагином добавить кнопку крестика, удаляющего трек из стрима, он будет записывать url трека к себе в базу, а затем просто искать треки с урлами из базы при подгрузке стрима и скрывать их, примерно так:

$('a[href="/diversa/murkmusic"]').closest('.soundList__item').hide()