Skip to content

Instantly share code, notes, and snippets.

View asci's full-sized avatar
🍊

Artem R asci

🍊
View GitHub Profile
#include <Arduino.h>
#include "Chassis.h"
#define STOP 0
#define FORWARD 1
#define RIGHT 2
#define LEFT 4
#define BACKWARD 5
Chassis::Chassis(int D1, int P1, int D2, int P2) {
function moduleFor(fullName, description, callbacks, delegate) {
var container;
var context;
var _callbacks = {
setup: function(){
callbacks = callbacks || { };
var needs = [fullName].concat(callbacks.needs || []);
container = isolatedContainer(needs);
App.SomeIndexRoute = Ember.Route.extend({
model: function () {
return this.store.find('some');
}
});
App.SomeShowRoute = Ember.Route.extend({
model: function (params) {
console.log('========================reload=========================='); // не вызывается если кликнуть по ссылке /#/some/111, но вызывается если обновить страницу
var some = this.store.find('some', params.id);
@asci
asci / sample.js
Created August 3, 2015 08:38
chainer
function toChain(target) {
var queue = [];
var lastReturn;
Object.keys(target).forEach(function (prop) {
var original;
if (typeof target[prop] === 'function') {
original = target[prop];
target[prop] = function () {
var args = arguments;
@asci
asci / index.spec.js
Last active August 29, 2015 14:27
angular $q is not working in test env
var inject = angular.mock.inject;
var $q;
describe('$q is really strange', function (){
beforeEach(inject(function ($injector){
$q = $injector.get('$q');
}));
it('should proof that q is working properly', function (done){
var lastRequest = $q.defer();
@asci
asci / index.js
Last active September 10, 2015 07:34
Arrow functions problem
const test = 0;
let superLongValue = 'other value';
const someObject = {};
someObject.methodB = test >= superLongValue + 'text';
someObject.otherMethodC = test => superLongValue = test;
@asci
asci / deploy.json
Last active December 30, 2015 22:25
deployment
{
"script" : "bin/www"
}
@asci
asci / react-motion.js
Created December 28, 2015 21:16
react-motion-build
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["ReactMotion"] = factory(require("react"));
else
root["ReactMotion"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
Built-in Atom packages (89)
├── about@1.3.0
├── archive-view@0.61.0
├── atom-dark-syntax@0.27.0
├── atom-dark-ui@0.51.0
├── atom-light-syntax@0.28.0
├── atom-light-ui@0.43.0
├── autocomplete-atom-api@0.9.2
├── autocomplete-css@0.11.0
├── autocomplete-html@0.7.2
@asci
asci / first_phase.md
Last active July 25, 2016 08:29
Resources for frontend developer