Skip to content

Instantly share code, notes, and snippets.

View mattallty's full-sized avatar
👾
Working on new stuff

Matt mattallty

👾
Working on new stuff
View GitHub Profile
@mattallty
mattallty / .profile
Created February 28, 2017 22:33 — forked from sindresorhus/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@mattallty
mattallty / hough.js
Last active August 29, 2015 14:27 — forked from pguyot/hough.js
Hough transform
var fs = require("fs"),
Canvas = require("canvas"),
Image = Canvas.Image;
var LEAST_REQUIRED_DISTANCE = 20, // LEAST required distance between 2 points , lets say smallest ellipse minor
LEAST_REQUIRED_ELLIPSES = 80, // number of found ellipse
arr_accum = [],
arr_edges = [],
edges_canvas,
@mattallty
mattallty / config.json
Last active August 29, 2015 14:12 — forked from anonymous/config.json
Limedocs Bootstrap Theme
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
function modify(modifiers) {
return through2.obj(function(file, encoding, done) {
var stream = this;
function applyModifiers(content) {
(typeof modifiers === 'function' ? [modifiers] : modifiers).forEach(function(modifier) {
content = modifier(content, file);
});
@mattallty
mattallty / es.sh
Last active August 29, 2015 13:57
cd ~
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java7-installer -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb
sudo dpkg -i elasticsearch-1.0.1.deb
sudo update-rc.d elasticsearch defaults 95 10
sudo service elasticsearch start
#curl http://localhost:9200
# Tweaked from http://tomislavsantek.iz.hr/2011/03/moving-mysql-databases-to-ramdisk-in-ubuntu-linux
# Log in as root
# Mount ramdisk folder in RAM
mkdir /tmp/ramdisk
mount -t tmpfs -o size=128M tmpfs /tmp/ramdisk/
# Move MySQL data
mv /var/lib/mysql /tmp/ramdisk/mysql
ln -s /tmp/ramdisk/mysql/ /var/lib/mysql
/*
* Android API Guide
* http://developer.android.com/guide/topics/ui/actionbar.html
* Android Design Guide
* http://developer.android.com/design/patterns/actionbar.html
* Titanium Mobile will support someday
* https://jira.appcelerator.org/browse/TIMOB-2371
*/
var osName = Ti.Platform.osname,
isAndroid = osName==='android',
@mattallty
mattallty / index.html
Created May 10, 2013 21:42 — forked from anonymous/index.html
Counter
<h1>
Still
<div class="counter">
<span class="decor top"></span>
<span class="decor bottom"></span>
<span class="from top"><span></span><span class="shadow"></span></span>
<span class="from bottom"><span></span><span class="shadow"></span></span>
<span class="to top"><span></span><span class="shadow"></span></span>
<span class="to bottom"><span></span><span class="shadow"></span></span>
</div>