Skip to content

Instantly share code, notes, and snippets.

View akornmeier's full-sized avatar

Tony Kornmeier akornmeier

View GitHub Profile
@akornmeier
akornmeier / WQraWq.markdown
Last active September 21, 2015 14:52
WQraWq
<section class="module color showimg preselect" data-common-name="color"
data-selector-type="box">
<h2 class="fab-body">
<em>color</em> <span>pink stripe</span>
</h2>
<div class="swap">
<span>
<a>
<label>
<span>color</span>
@akornmeier
akornmeier / oops
Created March 3, 2015 21:35
Erase a commit from GIT on remote
git reset --hard HEAD~2 {NUMBER OF COMMITS YOU FUCKED UP}
then `git commit` what should be comitted
and `git push --force`
// only use on your own fork, it will kill history of other people's commits if the HEAD is set back too far.
'use strict';
overlay.exports = function ariaTokenAttr(helperId, attr) {
// aria token attributes supported
// aria-controls(element, id)
// aria-describedBy(element, id)
// aria-flowTo(element, id)
// aria-labelledBy(element, id)
// aria-owns(element, id)
@akornmeier
akornmeier / beforeunload
Created February 17, 2015 17:21
Crossbrowser prevent page from reloading
window.addEventListener("beforeunload", function (e) {
var confirmationMessage = "\o/";
(e || window.event).returnValue = confirmationMessage; // Gecko and Trident
return confirmationMessage; // Gecko and WebKit
});
app = angular.module 'BlogExample', []
# Simple controller that loads all blog posts
app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) ->
# Get all the blog posts
Blog.all().then (posts) ->
$scope.posts = posts
# Extend the $scope with our own properties, all in one big block
# I like this because it looks like declaring a class.
git remote -v
# View existing remotes
# origin https://github.com/user/repo.git (fetch)
# origin https://github.com/user/repo.git (push)
git remote set-url origin https://github.com/user/repo2.git
# Change the 'origin' remote's URL
@akornmeier
akornmeier / gist:4567958
Created January 18, 2013 19:58
Migrator Framework Extension Method for extending the Command Timeout past the default 30 seconds. (Used for adding Indexes)
public static class MigrationExtensions
{
public static int ExecuteNonQuery(this ITransformationProvider itp, string sql, int timeout)
{
itp.Logger.Trace(sql);
itp.Logger.ApplyingDBChange(sql);
IDbCommand ic = itp.GetCommand();
ic.CommandText = sql;
ic.CommandTimeout = timeout;
try { return ic.ExecuteNonQuery(); }
@akornmeier
akornmeier / edit .bash_profile
Created May 28, 2012 15:59
Open .bash_profile in text edit
open -e .bash_profile