Skip to content

Instantly share code, notes, and snippets.

View hotmeteor's full-sized avatar
👾

Adam Campbell hotmeteor

👾
View GitHub Profile
@hotmeteor
hotmeteor / .sublime-keymap
Last active September 7, 2018 12:16
Sublime backtick auto-pair
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[`a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.backtick", "match_all": true }
]
},
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
@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

@hotmeteor
hotmeteor / gradient.css
Last active August 29, 2015 14:05
Beautiful radial gradient
/* as seen at http://uilang.com/ */
main {
background: radial-gradient(ellipse farthest-side at 100% 100%, #F8FFF3 10%, #85D8CE 50%, #085078 120%);
}
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)
@hotmeteor
hotmeteor / copy
Last active August 29, 2015 14:02
rsync copy huge files, with verbosity, mirroring, progress, and resume.
rsync -vaP --progress /Volumes/Source /Volumes/Destination --dry-run
git tag -a v1.0 -m 'my version 1.0'
git push --tags
@hotmeteor
hotmeteor / config
Created May 6, 2014 23:38
Make AJAX calls to MAMP on the same domain as your grunt server
ProxyPass /ajax/ http://localhost:80/myappfolder/app/
ProxyPassReverse /ajax/ http://localhost:80/myappfolder/app/
ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
@hotmeteor
hotmeteor / config
Last active August 29, 2015 14:00
Have VirtualHostX point domains to a local port
ProxyPass / http://localhost:9100/
ProxyPassReverse / http://localhost:9100/
@hotmeteor
hotmeteor / data-replace.scss
Created March 31, 2014 15:21
Text replacer for smaller screens.
@media only screen and (max-width: 599px) {
[data-replace] {
display: inline-block;
overflow: hidden;
letter-spacing: -999em;
vertical-align: bottom;
&::before {
content: attr(data-replace);
letter-spacing: 0;
//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