Skip to content

Instantly share code, notes, and snippets.

View sime's full-sized avatar
🔒
Trezor

Simon Males sime

🔒
Trezor
View GitHub Profile
@sime
sime / callout.js
Created May 8, 2013 03:54
Attempting to $.extend Foundation.libs.tooltips,
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') {
default:
paths:
features: ../../features
extensions:
Behat\MinkExtension\Extension:
base_url: 'http://test.localhost:8080/'
goutte:
guzzle_parameters:
request.params:
redirect.disable: true
@sime
sime / learn2013.md
Last active December 18, 2015 23:49
I things I want to learn
  • AngularJS
  • PhoneGap
@sime
sime / _full_reveal.scss
Created September 16, 2013 08:20
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…
@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 / photo_saved.txt
Last active December 27, 2015 23:49
Nexus 4. PhoneGap + AngularJS failing on two way binding.
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 / gist:7641790
Created November 25, 2013 14:14
storing photos from camera
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 / tinkerbox_intern_rails_app.md
Last active December 30, 2015 22:09
A Rails app to get your hands dirty quickly

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 / angular-google-maps-2.0.9.custom.js
Created April 21, 2016 13:30
MultiPolygon support in Angular Google Maps 2.0.9
/*! 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 / ang-209-multipolygon.patch
Created April 21, 2016 13:52
Patch for Angular Google Maps 2.0.9 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 / hanlder.js
Created May 25, 2017 09:16
TechTalk: Serverless Framework, 24 May 2015
'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,
}),
};