Skip to content

Instantly share code, notes, and snippets.

View Vadorequest's full-sized avatar

Vadorequest Vadorequest

View GitHub Profile
let nextTodoId = 0
export const addTodo = (text) => {
return {
type: 'ADD_TODO',
id: nextTodoId++,
text
}
}
export const setVisibilityFilter = (filter) => {
Verifying that +vadorequest is my blockchain ID. https://onename.com/vadorequest
angular.module('app').service 'ClientService', (
$templateCache
Config
) ->
# Returns the class that must be applied to the body in order to enable the client's stylesheets.
# If no client then returns empty string.
@getClientClass = ->
return 'client-' + Config.client if Config.client.length
return ''
@Vadorequest
Vadorequest / routes.coffee
Created December 9, 2015 11:55
app/routes.coffee
angular.module('app').config ($stateProvider, $urlRouterProvider) ->
$urlRouterProvider.when '/', '/users'
_checkSession = ngInject (SessionService, $q) ->
defer = $q.defer()
unless SessionService.isValid()
defer.reject('not logged')
else defer.resolve()
return defer.promise
/**
* Compiles LESS files into CSS.
*
* ---------------------------------------------------------------
*
* Only the `assets/styles/importer.less` is compiled.
* This allows you to control the ordering yourself, i.e. import your
* dependencies, mixins, variables, resets, etc. before other stylesheets)
*
* For usage docs see:
@Vadorequest
Vadorequest / watch.js
Created October 9, 2015 18:23
Grunt-watch config file.
/**
* Run predefined tasks whenever watched file patterns are added, changed or deleted.
*
* ---------------------------------------------------------------
*
* Watch for changes on
* - files in the `assets` folder
* - the `tasks/pipeline.js` file
* and re-run the appropriate tasks.
*
/**
* Compile les fichiers TypeScript (ts) en JS.
* Les recompile au même endroit que les fichiers TS.
*
* @see https://github.com/TypeStrong/grunt-ts
*/
module.exports = function(grunt) {
grunt.config.set('ts', {
serverCommonJs: {
files: [
/**
* Run predefined tasks whenever watched file patterns are added, changed or deleted.
*
* ---------------------------------------------------------------
*
* Watch for changes on
* - files in the `assets` folder
* - the `tasks/pipeline.js` file
* and re-run the appropriate tasks.
*
/**
* Synchronisation entre les fichiers sources et les fichiers générés avec raffraichissement auto du navigateur.
* Aide intégrée: http://localhost:3001/ (quand le serveur est lancé)
*
* @see http://www.browsersync.io/docs/
*/
module.exports = function(grunt) {
grunt.config.set('browserSync', {
bsFiles: {
src : [
########################
# node.js / npm
########################
lib-cov
*.seed
*.csv
*.dat
*.out
*.pid
*.gz