Skip to content

Instantly share code, notes, and snippets.

View theaccordance's full-sized avatar
:octocat:

Joe Mainwaring theaccordance

:octocat:
View GitHub Profile
@theaccordance
theaccordance / sublime-text-2-cli
Created November 15, 2013 18:49
Run this command to add a shortcut to sublime in your OS X command line interface. I prefer Sublime over vim or nano so this makes it far easier to work with files buried within the operating system. Reference: http://www.sublimetext.com/docs/2/osx_command_line.html
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/
@theaccordance
theaccordance / staging environment configuration
Created November 13, 2013 23:03
A git configuration that allows you to use Github Pages as a staging environment.
[remote "stage"]
url = git@github.com:theaccordance/example-repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
push = +refs/heads/dev:refs/heads/gh-pages
push = +refs/heads/dev:refs/heads/dev
@theaccordance
theaccordance / smooth-link-hover.css
Last active December 21, 2015 01:29
Method to smooth the change in style for links between their normal ruleset and the changes applied by hovering.
@theaccordance
theaccordance / hexagon.css
Last active December 20, 2015 09:49
Method for creating Hexagons using CSS
.hex-top {
width: 0;
border-bottom: 60px solid #e8e4e2;
border-left: 150px solid transparent;
border-right: 150px solid transparent;
}
.hex-body {
width: 300px;
height: 180px;
@theaccordance
theaccordance / 404-redirect.htaccess
Created July 22, 2013 20:54
Rule for .htaccess documents to direct 404 errors to a specified page template.
ErrorDocument 404 /404error.html
@theaccordance
theaccordance / app-smart-banner.html
Created July 19, 2013 20:40
Method to add an App Smart Banner to website. Visible only when navigating to a website using an iOS device only. App-ID is the only required argument. More Info can be found here: http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
@theaccordance
theaccordance / social-overlay.css
Created July 10, 2013 23:08
CSS Rules for creating a social overlay using CSS3
/* Set the Width and Height for all objects */
.card, .portrait, .overlay {
width: 300px;
height: 300px;
}
/* Used to provide .portrait and .overlay with a reference for positioning */
.card {
position: relative;
}
<div class="card">
<div class="portrait"></div>
<div class="overlay">
<ul>
<li><a href="http://www.linkedin.com/in/josephmainwaring" target="_blank" class="linkedin">&nbsp;</a></li>
<li><a href="http://www.twitter.com/theaccordance" target="_blank" class="twitter">&nbsp;</a></li>
<li><a href="http://github.com/theaccordance" target="_blank" class="github">&nbsp;</a></li>
<li><a href="http://dribbble.com/theaccordance" target="_blank" class="dribbble">&nbsp;</a></li>
</ul>
</div>
@theaccordance
theaccordance / ui-boostrap.accordion.conditional-class.html
Created June 24, 2013 21:21
Method for conditionally applying a CSS class to an accordion group for UI-Bootstrap/AngularJS
<accordion-group ng-class="{true:'active', false:''}[isOpen]">
<!-- Accordion content goes here -->
</accordion-group>
@theaccordance
theaccordance / slider.tooltip.html
Last active December 18, 2015 22:09
HTML implementation for slider.tooltip.js, implemented by adding the attribute data-popup-enabled to your input element.
<!-- Tooltip is enabled by adding the attribute data-popup-enabled="true" to the input element -->
<input type="range" name="slider-1" id="slider-1" min="0" max="100" value="50" data-popup-enabled="true">