Skip to content

Instantly share code, notes, and snippets.

View alfonsogarciacaro's full-sized avatar

Alfonso Garcia-Caro alfonsogarciacaro

View GitHub Profile
@alfonsogarciacaro
alfonsogarciacaro / script.fsx
Created April 25, 2016 15:57
Script to compare existing versions of Android image resources
open System
open System.IO
let sep = ";"
let resultsFile = __SOURCE_DIRECTORY__ + "/results.csv"
let resourcePath = "/Users/alfonsogarciacaronunez/Documents/Github/mobile/Joey/Resources"
let limit = DateTime.Today.AddDays(-10.)
let set = System.Collections.Generic.HashSet<string>()
let dic = System.Collections.Generic.Dictionary<string,(string list)>()
@alfonsogarciacaro
alfonsogarciacaro / README.md
Last active April 5, 2016 11:34
Server operations for toggl/mobile

Server Requests

  • Authentication: Signup, Login, SignupWithGoogle, LoginWithGoogle
  • DownloadEntries: Download entries from server between two dates (after trying to load them from local db). Triggered by scrolling the TE list.
  • GetChangesFrom: Get changes from server since a specific datetime. Triggered by swiping down the TE list.
  • GetCurrent(Server)State: Get current data from server (no changes). Happens after logging.
  • Item create/update/delete

Server Responses

  • Authentication
  • DownloadEntries
@alfonsogarciacaro
alfonsogarciacaro / server.js
Created March 31, 2016 19:19
Fable/samples/browser/react
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _models = require("./models");
var _models2 = _interopRequireDefault(_models);
@alfonsogarciacaro
alfonsogarciacaro / wrapper.js
Created March 21, 2016 20:42
Wrap Fable modules to expose default member in CommonJS
var fableModule = require("./fable-module.js");
for (var key in fableModule.default) {
exports[key] = fableModule.default[key];
}
@alfonsogarciacaro
alfonsogarciacaro / gist:83df0cd2cdd8e6f3a0e6
Created April 21, 2015 10:16
Ractive TodoMVC sample generated with FunScript fNext
(function(){
var ns={};
ns.Program = {};
ns.Program.main = (function() {
var patternInput = ns.Program.init();
var ractive = patternInput[0];
var data = patternInput[1];
ns.Program.todosProcess(ractive, data['items']);
ns.Program.toggleProcess(ractive, data['items']);
return ns.Program.filterProcess(ractive)