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
const respond = body => ctx.body = body && body | |
const handler = respond('Hello World') |
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
import compose from 'ramda' | |
import { reviews } from './schema' | |
import { normalize, denormalize } from '../lib/normalizer' | |
import { serialize } from '../lib/serializer' | |
import { validate } from '../lib/validator' | |
import { load, save } from '../lib/defaultOperations' | |
import { respond } from '../lib/http' | |
const get = async (cxt, id) => load(reviews, id) |
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
const wifi = require('Wifi'); | |
const http = require('http'); | |
const DS18B20 = require('DS18B20'); | |
const BMP085 = require('BMP085'); | |
const wifiSSID = 'cool'; | |
const wifiKey = 'secret'; | |
const tempProbePin = NodeMCU.D3; | |
const atmospherePins = { |
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
// Simple unoptimized calculator for the nth fibonacci number. | |
const fibonacci = n => (n <= 1 ? n : fibonacci(n - 1) + fibonacci(n - 2)) | |
console.time('fibonacci') | |
console.log(fibonacci(20)) | |
console.timeEnd('fibonacci') | |
// A single argument function memoization wrapper. | |
const memoize = func => { | |
const cache = {} |
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
module_load_include('inc', 'uuid', 'uuid.entity'); | |
$node = entity_uuid_load("node", array("ff355981-9c66-4847-8905-82db742ec112")); | |
$node[2]->uid = "c9993341-a57b-4318-ab33-fb01aa38084a"; | |
entity_uuid_save("node", $node[2]); | |
dpm(node_load(2)); |
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
Olha que legal. |
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
diff --git a/applications/default/public/js/app.js b/applications/default/public/js/app.js | |
index 2e7ae9e..2c7f0c0 100644 | |
--- a/applications/default/public/js/app.js | |
+++ b/applications/default/public/js/app.js | |
@@ -1,7 +1,7 @@ | |
'use strict'; | |
// Declare app level module which depends on services, directives and filters. | |
-angular.module('choko', ['ngRoute', 'ngResource', 'ngSanitize', 'summernote', 'angularFileUpload', 'choko.services', 'choko.directives', 'choko.filters']) | |
+angular.module('choko', ['ngRoute', 'ngResource', 'ngSanitize', 'summernote', 'angularFileUpload', 'choko.services', 'choko.directives', 'choko.filters', 'choko.controllers']) |
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
<?php | |
function custom_delete_all_orders() { | |
// Delete orders. | |
$order_ids = db_query('SELECT order_id FROM {commerce_order}')->fetchCol(); | |
commerce_order_delete_multiple($order_ids); | |
unset($order_ids); | |
// Delete line items. | |
$line_item_ids = db_query('SELECT line_item_id FROM {commerce_line_item}')->fetchCol(); |
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
myApp.controller('ListController', function($scope, $route, $location, $http, Categories){ | |
$scope.category = 'categoria-1'; | |
$scope.subCategory = 'sub-categoria-1'; | |
$scope.setCategory = function(category) { | |
$scope.category = category.name; | |
}; | |
$scope.setSubCategory = function(category) { | |
$scope.subCategory = subCategory.name; |
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
$scope.buttons = [ | |
{ | |
"type": "normal", | |
"title": "First normal" | |
}, | |
{ | |
"type": "normal", | |
"title": "Second normal" | |
}, | |
{ |
NewerOlder