Skip to content

Instantly share code, notes, and snippets.

Simon Males sime

Block or report user

Report or block sime

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sime
sime / hanlder.js
Created May 25, 2017
TechTalk: Serverless Framework, 24 May 2015
View hanlder.js
'use strict';
module.exports.hello = (event, context, callback) => {
const response = {
statusCode: 200,
body: JSON.stringify({
message: 'Go Serverless v1.0! Your function executed successfully!',
input: event,
}),
};
@sime
sime / ang-209-multipolygon.patch
Created Apr 21, 2016
Patch for Angular Google Maps 2.0.9 MultiPolygon patch
View ang-209-multipolygon.patch
--- angular-google-maps.js 2016-04-21 15:48:38.000000000 +0200
+++ angular-google-maps-2.0.9.custom.js 2016-04-21 15:43:34.000000000 +0200
@@ -2,7 +2,6 @@
* AngularJS directives for Google Maps
* git: https://github.com/angular-ui/angular-google-maps.git
*/
-
/*
!
The MIT License
@sime
sime / angular-google-maps-2.0.9.custom.js
Created Apr 21, 2016
MultiPolygon support in Angular Google Maps 2.0.9
View angular-google-maps-2.0.9.custom.js
/*! angular-google-maps 2.0.9 2014-11-18
* AngularJS directives for Google Maps
* git: https://github.com/angular-ui/angular-google-maps.git
*/
/*
!
The MIT License
Copyright (c) 2010-2013 Google, Inc. http://angularjs.org
@sime
sime / tinkerbox_intern_rails_app.md
Last active Dec 30, 2015
A Rails app to get your hands dirty quickly
View tinkerbox_intern_rails_app.md

Message board

A message board application where people can contribute to various topics.

At each step, the application must be deployed on Heroku

Create a message (thread).

Anyone can post a message. A new message requires the following fields

  • subject
@sime
sime / gist:7641790
Created Nov 25, 2013
storing photos from camera
View gist:7641790
if (window.resolveLocalFileSystemURI) {
console.log('Attemping to resolveFileSystemURI of ' + imageData);
window.resolveLocalFileSystemURI(
imageData,
function(fileEntry) {
console.log('requesting file system');
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {
console.log('moving file');
fs.root.getDirectory('bob', {create: true}, function(dirEntry) {
var fileName = moment().valueOf().toString() + '.jpg';
@sime
sime / photo_saved.txt
Last active Dec 27, 2015
Nexus 4. PhoneGap + AngularJS failing on two way binding.
View photo_saved.txt
I/WindowManager( 511): Screenshot Window{41e90238 u0 com.google.android.gallery3d/com.android.camera.CameraActivity} was all black! mSurfaceLayer=21100 minLayer=21100 maxLayer=21100
V/CAM_PhotoModule(31599): stopPreview
E/mm-libcamera2( 174): PROFILE HAL: stopPreview(): E: 1384150355.605338095
E/mm-camera( 208): config_MSG_ID_STOP_ACK: streamon_mask is not clear. Should not call PP_Release_HW
D/LocationManager(31599): stopReceivingLocationUpdates
E/mm-libcamera2( 174): PROFILE HAL: stopPreview(): E: 1384150355.614890971
E/QCameraHWI( 174): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*):Received Setting NULL preview window
E/QCameraHWI( 174): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*): mPreviewWindow = 0x0x0, mStreamDisplay = 0x0xb8d2cc98
W/QCameraHWI_Preview( 174): Setting NULL preview window
I/CameraClient( 174): Destroying camera 1
@sime
sime / _full_reveal.scss
Created Sep 16, 2013
Full screen Reveal in Foundation 4.3.1 on small screens I think modals (i.e. Reveal) are broken on small screens when they contain a form. I've introduced a new class 'full-on-small' which will expand modals to 100% width on small screens. This is a drop in solution, I've also attempted to solve this in a different manner upstream: https://githu…
View _full_reveal.scss
@media screen and (max-width: $small-screen) {
.#{$reveal-modal-class} {
&.full-on-small {
top: 0;
margin-#{$default-float}: 0;
#{$default-float}: 0;
width: 100%;
}
}
}
@sime
sime / learn2013.md
Last active Dec 18, 2015
I things I want to learn
View learn2013.md
  • AngularJS
  • PhoneGap
View behat.yml
default:
paths:
features: ../../features
extensions:
Behat\MinkExtension\Extension:
base_url: 'http://test.localhost:8080/'
goutte:
guzzle_parameters:
request.params:
redirect.disable: true
@sime
sime / callout.js
Created May 8, 2013
Attempting to $.extend Foundation.libs.tooltips,
View callout.js
var callout = {
create : 'overwritten object'
};
$.extend(true, callout, Foundation.libs.tooltips);
if (typeof callout.create == 'function') {
alert('create() is still a function!');
}
if (typeof callout.create == 'string') {
You can’t perform that action at this time.