Skip to content

Instantly share code, notes, and snippets.

View liorkesos's full-sized avatar
😎
chillin

Lior Kesos liorkesos

😎
chillin
View GitHub Profile
@liorkesos
liorkesos / Overview
Last active May 23, 2016 09:21
Up the MEAN stack - Package flow...
In MEAN data is collected and communicated in the package and it goes through the different layers of angular, express and mongo.
The data "moves" "up the stack" from the angular view to the controller and then the service and from then to an express route a controller and model schema which is used to save the object in the db.
We'll use the create.html from the articles core package to demonstrate this.
@liorkesos
liorkesos / mean-upload
Last active November 17, 2015 08:55
The mean-upload package provides the next directive that lets you upload multiple files to the server
<mean-upload file-dest="'/files/photos/'"
upload-callback="uploadFinished(files)"
upload-file-callback="uploadFileCallback(file)"></mean-upload>
<div data-ng-repeat="img in images">
<img data-ng-src="{{img.src}}" alt="">
</div>
{
"name": "map",
"version": "0.0.1",
"description": "Maps lets you integrate directives and callbacks for location based applications",
"author": {
"name": "Lior Kesos"
},
"mean": "0.4.0",
"engines": {
"node": "0.10.x",
{
"name": "map",
"version": "0.1",
"dependencies": {
"angular-google-maps": "latest"
}
}
{
"directory": "public/assets/lib"
}
<carousel interval="myInterval">
<slide ng-repeat="site in sites" active="site.active">
<img ng-src="{{site.image}}" style="margin:auto;">
<div class="carousel-caption">
</div>
</img>
<span class="pull-left">
<h4 ng-model=site.name>Slide {{site.name}} by {{site.author}}</h4>
<p>{{site.text}}</p>
</span>
var Cylon = require('cylon');
// Initialize the robot
Cylon.robot({
connection: { name: 'spark',adaptor:'adaptor', accessToken: '3111decfe43f23fc4a45cb51eac70e91c9b509c0', deviceId: '53ff6e066667574847462567', module: 'spark' },
device: { name: 'led', driver: 'led', pin: 'D0' },
work: function(my) {
every((1).second(), function() {
my.led.toggle();
@liorkesos
liorkesos / gist:c2254b7c4a13763863f6
Created November 17, 2014 19:33
cylon analog read
var Cylon = require('cylon');
Cylon.robot({
connection: {
name: 'voodoospark',
adaptor: 'voodoospark',
accessToken: '7934611bc6bf91b50c67a4477d2e90bad4b8f561',
deviceId: '53ff6e066667574847462567',
module: 'cylon-spark'
},
@liorkesos
liorkesos / gist:09a96f77d7ffc23d85cb
Created November 20, 2014 06:51
Web Tutorials to start with
Git - https://try.github.io/levels/1/challenges/1
html/css - http://www.codecademy.com/en/tracks/web
javascript - http://www.codecademy.com/en/tracks/javascript
Angular Intro - https://www.codeschool.com/courses/shaping-up-with-angular-js
Another angular tutorial - https://thinkster.io/angulartutorial/mean-stack-tutorial/
Angular videos - https://egghead.io/
MEAN stack basics - https://thinkster.io/angulartutorial/mean-stack-tutorial
{
"defaults":{
"db": "mongo",
"taskrunner": "grunt",
"preprocessor":"none",
},
"dependencies":{"mean-admin":"latest"}
}