This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var _ = require('lodash'); | |
var fs = require('graceful-fs'); | |
var cheerio = require('cheerio'); | |
function getCvs(){ | |
request('https://betabeers.com/static/uploads/cv/', function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
parseResponse(body, 'files','http://betabeers.com/static/uploads/cv/') // Print the google web page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var request = require('request'), | |
q = require('q'), | |
_s = require('underscore.string'), | |
_ = require('lodash'), | |
streamify = require('stream-array'), | |
log = require('config').apiLogger; | |
var csv = require("csv-streamify"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//First version, it does the update for a lot of entities in a canvas based game. | |
function updateEntities(dt) { | |
// Update the player sprite animation | |
player.sprite.update(dt); | |
// Update all the bullets | |
for(var i=0; i<bullets.length; i++) { | |
var bullet = bullets[i]; | |
bullets[i].sprite.update(dt); | |
switch(bullet.dir) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
browserify = require('gulp-browserify'), | |
concat = require('gulp-concat'), | |
embedlr = require('gulp-embedlr'), | |
refresh = require('gulp-livereload'), | |
lrserver = require('tiny-lr')(), | |
express = require('express'), | |
livereload = require('connect-livereload') | |
livereloadport = 35729, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var Input = {}; | |
var functions = { | |
'mousedown' : [], | |
'mouseup': [], | |
'mousemove': [], | |
'keyup': [], | |
'keydown': [], | |
'mousewheel': [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
angular.module('myApp') | |
.factory('UtilsSrv', | |
[ function () { | |
//You can disable the loggin of data here, also you can set the level of debug | |
var debugMode = true; | |
var logLevel = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function module_field_default_fields_alter(&$fields) { | |
$source_dir = drupal_get_path('theme', 'soc') . '/images/default'; | |
$field_default_images = array( | |
//'user-user-field_user_picture' => 'avatar.png', - This is exported in the feature | |
//'field_collection_item-field_people-field_people_photo' => 'avatar.png', - example for field collection | |
'node-event-field_event_image' => 'minificha_eventos.gif', | |
'node-news-field_image' => 'minificha_noticias.gif', | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!empty($ids)){ | |
$ids2 = array_filter($ids); | |
if(!is_null($ids2)){ | |
$ids2 = array_filter($ids2, 'is_string'); | |
} | |
if(!is_null($ids2)){ | |
$ids2 = array_filter($ids2, 'strlen'); | |
} | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$name = 'my_view'; | |
$display = 'page_1'; | |
$exposed = array('title', 'type', 'created'); | |
public function hasExposed($name, $display, $exposed){ | |
$view = views_get_view($name); | |
$view->set_display($display); | |
$view->preview=TRUE; | |
$view->is_cacheable = FALSE; | |