Skip to content

Instantly share code, notes, and snippets.

View illepic's full-sized avatar

Christopher Bloom illepic

View GitHub Profile
@illepic
illepic / Views CONTAINS args
Created March 30, 2011 06:51
Get an arg from a path and turn that into NID args for views
<?php
//remember to remove the php beginning and end before pasting in views args
// get the third word from url (search/site/searchterm)
$searchterm = arg(2);
// new awesome node query system
$query = new EntityFieldQuery();
$entities = $query->entityCondition('entity_type', 'node')
->propertyCondition('title', $searchterm, 'CONTAINS')
@illepic
illepic / dabblet.css
Created January 25, 2012 04:19
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
@illepic
illepic / dabblet.html
Created January 27, 2012 06:22
Untitled
<!-- content to be placed inside <body>…</body> -->
<ul>
<li><a href="http://www.google.com">Test</a></li>
<li><a href="https://www.yourbankaccount.com">Test2</a></li>
<li><a href="http://www.amazon.com">Test3</a></li>
</ul>
@illepic
illepic / gist:2760957
Created May 21, 2012 07:35
SASS + Compass for social menus
// Include the social networks our social menu will have
$social-networks: facebook, spotify, vimeo, twitter, spotify, myspace, tumblr, youtube;
// This loops through that list, adding in those selectors
@each $social-network in $social-networks{
#block-menu-menu-social{
// select by href including network name
a[href*="#{$social-network}"]{
// include the sprites, "false" means don't include dimensions (we do that in "#block-menu-menu-social a")
@include sitesprites-sprite(social-#{$social-network}, false);
/* test */
body{ background-color: blue; }
@illepic
illepic / gist:3759348
Created September 21, 2012 01:50
sass
<div class="container">
<div class="row">
<div class="span4 sidebar">
<h1>Hello, world!</h1>
</div>
<div class="span8">
<button type="button" class="btn btn-success">this is a button</button>
</div>
</div>
</div>
@illepic
illepic / gist:3910277
Created October 18, 2012 07:26
Foundation Zen includes
scripts[] = js/foundation/modernizr.foundation.js
scripts[] = js/foundation/jquery.foundation.tabs.js
scripts[] = js/foundation/jquery.foundation.forms.js
scripts[] = js/foundation/app.js
@illepic
illepic / autobop.js
Last active October 13, 2015 09:57
autobop
javascript:(function(){$('body').append('<script src=\'http://pinnacleofdestruction.net/tt/autott_voteonly.js\'></script>');})();
@illepic
illepic / lonely.js
Created January 29, 2013 18:15
TurnTable Lonely
javascript:(function(){for(var x in turntable){if(turntable[x] != null&&turntable[x].hasOwnProperty('numDjs')&&!turntable[x].hasOwnProperty('numDjsClone')){turntable[x]['numDjsClone']=turntable[x]['numDjs'];turntable[x]['numDjs']=function(){if(this.numDjsClone()==1)return 0;else return this.numDjsClone();};alert("NOP's Lonely DJ Deafness Cure Applied Successfully :)");}}})();
@illepic
illepic / index.html
Last active December 12, 2015 07:09
<html>
<head>
<script src="/path/to/jquery.js"></script> <!-- This is where jQuery resides, in this file -->
<script src="/path/to/our/script.js"></script> <!-- This is where we write OUR javascript. We can now use all the goodies in jQuery -->
</head>
<body>
<ul>
<li>Stuff 1</li>
<li>Stuff 2</li>
</ul>