Skip to content

Instantly share code, notes, and snippets.

View asavin's full-sized avatar
🏠
Working from home

Alexander Savin asavin

🏠
Working from home
View GitHub Profile
var template, dom;
template = require('./my-template');
dom = require('dom');
module.exports = function(target, data){
var d;
d = dom(target);
return d.append(template({
"dependencies": {
"component/dom": "*"
}
configure_component = (builder) ->
builder.use require 'component-coffee'
builder.use require 'component-livescript'
builder.use require 'component-jade'
builder.use require 'component-less'
grunt.initConfig
componentbuild:
components:
options:
name: 'main'
configure: configure_component
src: 'src/components'
dest: 'src/files/components'
combine:
"dependencies": {
"component/dom": "*",
"component/event": "*",
"redbadger/collapsible": "*"
},
"local": [
"search-filters-tags",
"search-filters-published"
]
{
"name": "main",
"local": [
"autocomplete",
"search",
"ie8-warning",
"settings-handler"
],
"paths": [
"local"
<script>
dom = require('dom');
autocomplete = require('autocomplete');
window.addEventListener('load', function() {
autocomplete('.searchBox');
autocomplete('#mobile-search');
})
</script>
<script src="/components/main.js"></script>
@asavin
asavin / digging_tunnels.md
Last active August 29, 2015 14:01
Digging Tunnels blogpost

#Digging tunnels

When developing a web app of any sort, usually you have a local server on your local machine. The server is running your app, which you can access using your favorite browser. Later on, when the moment is right, the app is deployed to a public server. From there you can access it from any other machine or mobile device.

Sometimes however you'd want to make your local server publicly accessible. Here are just a few reasons why this might be useful:

  • Developing a mobile web app. While you can use various emulators locally, they are not really replacing any real device. Being able to access local server from any mobile device while developing the app is a huge benefit.
  • Collaboration. You can send a public link to your colleague (or client) and have them try the real app. Again, they can very well try your app on their mobile devices, on the go.
  • Breaking out of the virtual box. Some companies prefer putting development environments into various kinds of virtual terminals. With local tun
@asavin
asavin / discovermeteor.md
Last active August 29, 2015 14:01
Пост про Discover Meteor на habrahabr

#Книжка Discover Meteor переведена на русский

Познавательная книжка Discover Meteor теперь переведена усилиями сообщества на русский язык и находится в свободном доступе. Английская версия по-прежнему требует подписки и стоит (разумных) денег.

В начале марта авторы оригинальной книжки Sacha Greif и Tom Coleman бросили клич, приглашая любителей фреймворка MeteorJS перевести ее на все языки мира. Локализированные версии книжки выкладывались бы под свободной лицензией Creative Commons, свободно доступные для всех желающих быстро познать мир Meteor. В настоящий момент существуют переводы на 22 языка мира, в разной степени готовности. Проект доступен на GitHub, и если кто-то заметил опечатку, или желает как-то дополнить перевод - добро пожаловать в команду.

14 основных глав и 11 пояснительных хорошо знакомят с миром Meteor и доступны даже тем, кто никогда не занимался веб разработкой. Meteor - полноценный фреймворк со своей отдельной вселенной подключаемых пакетов под названием Atmosphere, и, в некотором смысле