Skip to content

Instantly share code, notes, and snippets.

@artursmirnov
artursmirnov / settings.json
Created February 16, 2022 15:22
VSCode setup
{
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.wordWrapColumn": 100,
"files.exclude": {
"**/.coverage": true,
"**/.yardoc": true,
"**/build/**": true,
"**/node_modules/**": true,
"**/tmp": true
import Component from '@glimmer/component';
import { action } from '@ember/object';
export default class extends Component {
@action
onClick() {
console.log('clicked 1');
}
}
@artursmirnov
artursmirnov / .projections.json
Created August 7, 2019 14:31
Projections for Ember application (classic layout)
{
"app/models/*.js": {
"type": "model",
"alternate": "app/adapters/{}.js"
},
"app/adapters/*.js": {
"type": "adapter",
"alternate": "app/serializers/{}.js"
},
"app/serializers/*.js": {
@artursmirnov
artursmirnov / ember.projections.json
Last active October 17, 2018 08:51
VIM Projections
{
"app/initializers/*.js": {
"type": "initializer"
},
"app/models/*.js": {
"type": "model",
"alternate": "app/adapters/{}.js"
},
"app/adapters/*.js": {
"type": "adapter",
@artursmirnov
artursmirnov / components.my-btn.js
Created April 5, 2017 22:00
doubleclickable-component
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
click() {
alert('single');
},
doubleClick() {
@artursmirnov
artursmirnov / !readme.md
Last active June 22, 2016 09:13
ember-app-collaboration

Ember application

This README outlines the details of collaborating on this Ember application.

Prerequisites

You will need the following things properly installed on your computer.

  • Git
  • Node.js (with NPM) - preferably via NVM. v4.2.2 is recommended. Some NPM dependencies still have issues with v5.*
@artursmirnov
artursmirnov / javascript.json
Last active March 3, 2016 12:27
vscode ember snippets
{
"Print to console": {
"prefix": "log",
"body": [
"Ember.debug($1);$0"
],
"description": "Log output to console"
},
"Warn to console": {
"prefix": "warn",
/**
* Finds all number pairs in given array whose sum equals to 10
* @param {Array} inputArray Array for search in
* @returns {Array} Resulting array of number pairs
*/
function findInArray (inputArray) {
var results = [];
if (inputArray && inputArray.length) {
@artursmirnov
artursmirnov / ember-cli-bootstrap-v2
Last active August 29, 2015 14:18
Ember-CLI Bootstrap v2
#!/usr/bin/env bash
# prepare
sudo apt-get update
sudo apt-get install -y build-essential git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install -y libgdbm-dev libncurses5-dev automake libtool bison libffi-dev mc libfontconfig
# install nvm
curl https://raw.githubusercontent.com/creationix/nvm/v0.24.0/install.sh | bash
source ~/.profile
@artursmirnov
artursmirnov / ember-cli-bootstrap.sh
Last active August 29, 2015 14:09
Setup Ember CLI environment
#!/usr/bin/env bash
# prepare
sudo apt-get update
sudo apt-get install -y build-essential git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install -y libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
# install nodejs
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc