Skip to content

Instantly share code, notes, and snippets.

View anthonydillon's full-sized avatar

Anthony Dillon anthonydillon

View GitHub Profile
if(Modernizr){
if (!Modernizr.svg || !Modernizr.backgroundsize) {
Y.all("img[src$='.svg']").each(function(node) {
node.setAttribute("src", node.getAttribute('src').toString().match(/.*\/(.+?)\./)[0]+'png');
});
}
}
core.setEqualHeight = function() {
var maxHeight = 0;
var heightArray = Array();
var collection = Y.all('.equal-height');
collection.each(function(node) {
node.all(' > div, > ul li').each(function(node) {
if(node.get('clientHeight') > maxHeight){
maxHeight = node.get('clientHeight');
}
});
@anthonydillon
anthonydillon / gist:4df41bfe9b86182f20d6
Created October 13, 2014 16:22
Search function from tour
this.appSearch = function($query){
if($query != ''){
var listFilesContents = '';
fileList = _parent.fileSystem.getFiles();
var listContents = '';
var i = this.totalApps.length;
var tempArray = new Array();
var patt1 = new RegExp($query,"gi");
while(i--){
tempArray = this.totalApps[i].name.match(patt1);
git submodule add -b v0.0.55 -- git@github.com:ubuntudesign/vanilla-framework.git _sass/vanilla-framework
git submodule update
@anthonydillon
anthonydillon / .html
Created December 15, 2015 12:05
indiatimes markup
<div class="container">
<header class="header">
<nav>
<ul class="header__menu">
<li class="header__menu-item">item 1</li>
<li class="header__menu-item">item 2</li>
<li class="header__menu-item">item 3</li>
</ul>
</nav>
<h1 class="header__title">indiatimes</h1>
@anthonydillon
anthonydillon / .scss
Created December 15, 2015 12:06
indiatimes scss
body {
background-color: #57B136;
font-family: Arial;
}
.container {
width: 600px;
box-shadow: 0 0 20px 10px rgba(0, 0, 0, .1);
margin: 40px;
background-color: white;
@anthonydillon
anthonydillon / docker-dns.sh
Last active February 25, 2016 09:20
Fix Docker's DNS
# To get the IPV4 IP
nmcli dev show | grep DNS
sudo vim /lib/systemd/system/docker.service
# Add dns flag to ExecStart
ExecStart=/usr/bin/docker daemon --dns 8.8.8.8 --dns 10.20.64.1 -H fd://
sudo systemctl daemon-reload
sudo service docker restart
@anthonydillon
anthonydillon / scratch.css
Last active August 17, 2016 14:21
scratch.css
/*
* Temporary styles to fix some inconsistencies between the latest markup and
* changes in cloud-vanilla-theme.
*/
.inline-list li {
display: inline-block;
}
.wrapper {