Skip to content

Instantly share code, notes, and snippets.

View hotmeteor's full-sized avatar
👾

Adam Campbell hotmeteor

👾
View GitHub Profile
@hotmeteor
hotmeteor / php-openssl.md
Last active December 10, 2017 07:21 — forked from ryanscherler/php-openssl.md
Use Homebrew PHP with OpenSSL instead of SecureTransport
@hotmeteor
hotmeteor / php-cs-fixer
Last active May 25, 2016 14:58 — forked from mpalourdio/php-cs-fixer
@fabpot php-cs-fixer config for PhpStorm
parameters
--level=psr2 --fixers=strict,strict_param,ordered_use,multiline_spaces_before_semicolon,short_array_syntax,concat_without_spaces,double_arrow_multiline_whitespaces,duplicate_semicolon,empty_return,extra_empty_lines,include,multiline_array_trailing_comma,namespace_no_leading_whitespace,new_with_braces,object_operator,operators_spaces,phpdoc_params,remove_leading_slash_use,remove_lines_between_uses,return,single_array_no_trailing_comma,spaces_before_semicolon,spaces_cast,standardize_not_equal,ternary_spaces,unused_use,whitespacy_lines,-psr0 --verbose --config=sf23 fix "$FileDir$/$FileName$"
working directory
$ProjectFileDir$
@hotmeteor
hotmeteor / README.md
Last active May 25, 2017 16:29 — forked from niallobrien/README.md
Laravel + Angular + Gulp

Laravel & Angular

Overview

This setup involves creating a Laravel API and an Angular client-app with Gulp covering the asset pipeline.

Our Laravel API server will serve one view only and that is to simply load the Angular app.

First, create a new directory for your project. We're going to place the server and client directories in here. You'll need to install Laravel, Yeoman, generator-gulp-angular and any other dependencies.

Server

from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def get_exif_data(image):
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags"""
exif_data = {}
info = image._getexif()
if info:
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
//TODO: make this a module
/**
* # SockJS socket management service
*
* Creates SockJS socket connection to server, re-connects on disconnection,
* and exports hooks to map handlers for various data interactions.
*
*/
angular.module('app').factory
<html>
<head>
<title>Animated Sparkline using SVG Path and d3.js</title>
<script src="https://raw.github.com/d3/d3.github.com/master/d3.v3.min.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
@hotmeteor
hotmeteor / gist:1683734
Created January 26, 2012 16:50 — forked from reinink/gist:1683466
Remove yellow background caused by Google Chrome autocomplete
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0)
{
$(window).load(function()
{
$('input:-webkit-autofill').each(function()
{
var text = $(this).val();
var name = $(this).attr('name');
$(this).after(this.outerHTML).remove();
$('input[name=' + name + ']').val(text);
@hotmeteor
hotmeteor / jquery.mobile.event.js
Created September 19, 2011 16:50 — forked from aaronrussell/jquery.mobile.event.js
Slightly modified version of jQuery Mobile's event handlers so can be used standalone without the rest of the framework
/*
* jQuery Mobile Framework : events
* Copyright (c) jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function($, undefined ) {
$.extend( $.support, {
orientation: "orientation" in window,