Skip to content

Instantly share code, notes, and snippets.

View twalther's full-sized avatar

Torbjörn Walther twalther

  • Novicell
  • Stockholm
View GitHub Profile
@twalther
twalther / hello-lambda.js
Last active October 27, 2015 20:49
Hello Lambda
console.log('Loading lambda function');
exports.handler = function(event, context) {
console.log('value1 =', event.key1);
context.succeed(event.key1);
};
@twalther
twalther / app.css
Created December 14, 2014 20:34
webos-2
body {
font-family: 'Nunito', HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
margin: 0;
padding: 0;
background-color: #333;
color: #eee;
}
#logo {
@twalther
twalther / index.html
Last active November 18, 2015 07:44
webos-blogpost
<!doctype html>
<html>
<head>
<title>Meridium blogginlägg</title>
<style>
body {
font-family: 'Nunito', HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
@twalther
twalther / results.json
Last active August 29, 2015 14:08
results.json
{
"results": [
{
"person_id": 1,
"firstName": "Byggare",
"lastName": "Bob",
"fullName": "Byggare Bob"
}
]
}
@twalther
twalther / data.json
Last active August 29, 2015 14:08
data.json
[
{
"person_id": 1,
"firstName": "Byggare",
"lastName": "Bob"
},
{
"person_id": 2,
"firstName": "Douglas",
"lastName": "Crockford"
@twalther
twalther / service.js
Last active August 29, 2015 14:08
service.js
var express = require('express');
var app = express();
var _ = require('lodash');
var bodyParser = require('body-parser');
var requester = require('request');
var data = require('./data.json');
var host = '127.0.0.1';
var port = 1337;
var apiUrl = 'https://legacy.boring.crm';
@twalther
twalther / package.json
Last active August 29, 2015 14:08
package.json
{
"name": "service-mock",
"version": "0.0.1",
"description": "Mock service",
"main": "service.js",
"dependencies": {
"body-parser": "^1.9.2",
"express": "^4.10.1",
"lodash": "^2.4.1",
"request": "^2.47.0"
@twalther
twalther / gulprunner.js
Created October 7, 2014 08:09
Sample gulprunner.js
var gulpfile = require('./gulpfile.js'),
gulp = require('gulp'),
prettyTime = require('pretty-hrtime'),
tasks = ['all'];
if(process.argv.length > 2) {
tasks = [process.argv[2]];
}
gulp.on('task_start', function(e) {
@twalther
twalther / gulpfile.js
Created October 7, 2014 08:08
Sample gulpfile.js
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
browserify = require('gulp-browserify'),
src = {
scripts: 'path-to-script-source/app.js',
scriptsWatch: ['path-to-script-source/app.js', 'path-to-script-source/scripts/**']
},
dest = {
scripts: 'path-to-script-dest'
};