Skip to content

Instantly share code, notes, and snippets.

View alexhidalgo's full-sized avatar
🌴
On vacation

Alex Hidalgo alexhidalgo

🌴
On vacation
View GitHub Profile
@alexhidalgo
alexhidalgo / Date function
Created February 28, 2015 23:51
Date only timeStamp()
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, and day
var date = [ now.getMonth() + 1, now.getDate(), now.getFullYear() ];
// Return the formatted string
return date.join("/") + suffix;
.controller('JournalCtrl', function($scope, $http, $interval) {
$interval(function() {
$http.get('http://tiny-pizza-server.herokuapp.com/collections/alex-hackathon-journal1')
.success(function(response){
$scope.messages = [];
for( var i = 0; i < response.length; i++ ) {
if(response[i].plantType && response[i].plantQuantity && response[i].plantNotes) {
$scope.messages.push(response[i]);
@alexhidalgo
alexhidalgo / Backbone Model
Last active August 29, 2015 14:18
Backbone
var myToDoModel = Backbone.Model.extend({
urlRoot: 'http://tiny-pizza-server.herokuapp.com/collections/alex-todo-items',
defaults: {
todo: null,
completed: true
},
idAttribute: '_id'
});
I am very proud of the Backbone model I created above for two reasons. Firstly, this model
<Response>
<Say voice="alice">Hello!</Say>
</Response>
<?php
$name = $_REQUEST['SendDigits']
// now greet the caller
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
<Say>Hello <?php echo $name ?>.</Say>
</Response>
var express = require('express'),
app = express(),
engines = require('consolidate'),
MongoClient = require('mongodb').MongoClient,
assert = require('assert')
app.engine('html', engines.nunjucks)
app.set('view engine', 'html')
app.set('views', __dirname + '/views')
MongoClient.connect('mongodb://localhost:27017/test', function (err, db) {
var query = {'company_code': 'biotech'}
var cursor = db.collection('companies').find(query)
cursor.forEach(
function (doc) {
console.log(doc.name + ' is a company')
},
function (err) {
Verifying my Blockstack ID is secured with the address 1FyKT5ZJdTTtmTURqD9dXTkbmRMVKqrDrL https://explorer.blockstack.org/address/1FyKT5ZJdTTtmTURqD9dXTkbmRMVKqrDrL
{
"platformVersion": "11.4",
"platformName": "iOS",
"automationName": "XCUITest",
"deviceName": "iPhone 6",
"udid": "67CD9028-3F3B-48DE-B39B-5A391980214F",
"usePrebuiltWDA": true,
"useNewWDA": false,
"waitForQuiescence": false,
"maxInstances": 1,
@alexhidalgo
alexhidalgo / wdio.shared.conf.js
Created November 5, 2018 18:48
shared config
exports.config = {
//
// ==================
// Specify Test Files
// ==================
// Define which test specs should run. The pattern is relative to the directory
// from which `wdio` was called. Notice that, if you are calling `wdio` from an
// NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
// directory is where your package.json resides, so `wdio` will be called from there.
//