Skip to content

Instantly share code, notes, and snippets.

@shcoderAlex
shcoderAlex / javascript_resources.md
Created October 24, 2013 03:36 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@shcoderAlex
shcoderAlex / new_gist_file
Created October 24, 2013 04:47
Перевод документации модуля
node-amqp
Это клиент для RabbitMQ (и, возможно, для других серверов?). Этот клиент частично реализует версию 0.9.1 протокола AMQP.
Установка
npm install amqp
Синопсис
Пример подключения к серверу и прослушивание очереди.
@shcoderAlex
shcoderAlex / new_gist_file
Created October 24, 2013 04:48
Инструкция по монге
/*
* Конспект по MongoDB
* @author Alexey Vikarchuk
* @editor Amantay Eldar
*/
//========================= ~INSTALLING ==========================
INSTALLING / УСТАНОВКА:
Самый простой способ установки MongoDB - это установка через официальный .deb пакет для LinuxUbuntu (Linux Mint и прочих ubuntu-форков).
1. Установите 10gen GnuPG Public Key:
#Запись с экрана
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
#Сжатие
ffmpeg -i 122.avi -vcodec libx264 -threads 0 -r 25 -g 50 -b 500k -bt 500k -acodec aac -strict experimental -ac 6 122.mp4
#ld.so.conf
/etc/ld.so.conf
<snippet>
<content><![CDATA[console.log(${0:$TM_SELECTED_TEXT});]]></content>
<tabTrigger>cl</tabTrigger>
<scope>source.js</scope>
<description>console.log</description>
</snippet>
async.auto({
getTempIdProducts: getTempIdProducts //Получаем массив айдишников продуктов
, getProductsById: ['getTempIdProducts',getProductsById]
})
function getTempIdProducts(cb){
Home.findOne({user:req.user.id}).exec(function(err, home){
if(_.size(home.temp)){77777777777777
home.temp.forEach(function(temp){
arr.push(temp.id)
var name = 'Peter';
model.findOne({name: new RegExp('^'+name+'$', "i")}, function(err, doc) {
//Do your action here..
});
@shcoderAlex
shcoderAlex / variable.js
Created November 12, 2013 03:30
Область видимости переменных.
var a = "global"
function who(){
console.log(a) //undefined
var a = 'local'
}
@shcoderAlex
shcoderAlex / new_gist_file
Created November 12, 2013 07:21
Метки в javascript
loop: for(var i = 0; i<=10; i++){
continue loop;
}
Всем привет.
Я сижу на линуксе около трёх лет, начинал с убуту и около года сидел на ней. Она жутко гнала(вероятно из-за меня же), но работало. Много раз я соглашался с менеджером пакетов удалить libc из-за этого просто переставлял убунту. Бывали случаи когда правя Grub я его ломал и снова накатывал убунтушку. Потом мой взор пал на аскетичный CrunchBang. Он очень простой и стабильный в плане софта. Рабочий стол вообще чистый, честно говоря это первое, что меня в нём привлекло. С ним я уже около двух лет и он стоит на каждой моей машине.
От винды я отказался полностью, года два назад, полностью живу с этим и радуюсь. Иногда аптайм моих компов достигает 2-3 месяцев пока не выключат свет.
Ниже я расскажу о своём наборе утилиток:
✔ CrunchBang distribution based Debian 7 Wheezy
✔ SublimeText3
✔ Guake Terminal
✔ ZSH SHELL