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 / opensourceberlin
Last active August 29, 2015 14:07
Open Source Berlin
Companies whose core product is open source and actively developed in Berlin.
* CartoDB
* Crate.io
* Fairnopoly
@sime
sime / o2_google.txt
Last active August 29, 2015 14:11
o2 resolving Google CDN static content
# o2 ADSL, Berlin Mitte
# Using cURL, fetch the jQuery library within ten seconds.
$ curl -m 10 http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.js > /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0
curl: (28) Connection timed out after 10005 milliseconds
# Content from ajax.googleapis.com (and fonts.googleapis.com) time out!
@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