Skip to content

Instantly share code, notes, and snippets.

@imjared
imjared / logo.scss
Last active August 29, 2015 14:00
source for codepen.io/imjared/full/athzf.
@import "mathsass/dist/math.scss";
$radius: 12px;
$colors : (
1: #746f86,
2: #746f86,
3: #a16e8f,
4: #a16e8f,
5: #a9637b,
6: #a9637b,
var total = 0;
$('.results-list tr').not('thead tr').each( function() {
var amount = $(this).find('td').eq(4).text();
amount = amount.replace('$', '');
total = total + parseFloat( amount );
});
console.log( 'total amount: $' + total.toFixed( 2 ) + ', lol' );
@imjared
imjared / dabblet.css
Created June 26, 2012 19:44
radiating circle object in one line of html and a few more lines of css
/**
* radiating circle object in one line of html and a few more lines of css
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
display: -webkit-box;
-webkit-box-align: center;
@imjared
imjared / {sv_performance}
Created September 28, 2012 16:49
query performance
{if member_group == '1'}
<div id="site-performance" style="position: fixed; right: 0; bottom: 0; padding: 7px; background: rgba(0,0,0,0.7); color: white; font-family: Verdana, sans-serif; z-index: 999; ">
<span id="site-total-queries">{total_queries}</span> queries<br />
<span id="site-elapsed-time">{elapsed_time}</span> seconds
</div>
{/if}
@imjared
imjared / Add new line
Last active October 11, 2015 06:58
Find css closing brackets that don't have newlines after them. Useful if you get css that isn't formatted so nicely.
\}\n(#|\.|[A-Z]|/|:|\*)
@imjared
imjared / gist:4136553
Created November 23, 2012 17:23
Build tables in Jekyll
<!-- store in _includes/table -->
<table>
<tr class="header">
{% for headerItem in site.table[tableName].headers %}
<th>{{ headerItem }}</th>
{% endfor %}
</tr>
{% for dataRow in site.table[tableName].data %}
<textarea style="height: 100%; width: 100%; background: #222; padding: 5% 25%; color: #eee;"></textarea>
@imjared
imjared / rename.sh
Last active December 24, 2015 00:29
if you get a bunch of files that have an undesirable prefix and you want to remove it, just tell this script the prefix
#!/bin/bash
# takes an argument of an undesired prefix then removes it from all files in dir
# if no arg is passed, prompt for name
if [ $# -eq 0 ]
then
read -p 'What prefix do you want to remove?: '
prefix=$REPLY
else
prefix=$1
@imjared
imjared / bootstrap-breakpoints.scss
Last active August 16, 2016 10:13
scss breakpoint helpers based on bootstrap
// breakpoint helpers based on bootstrap's breakpoints
@mixin xs {
@media #{screen} and (max-width: #{$screen-xs-max}) {
@content;
}
}
@mixin sm {
@media #{screen} and (min-width: #{$screen-sm-min}) and (max-width: #{$screen-sm-max}) {
@imjared
imjared / lime.sh
Created September 22, 2016 02:02
#!/bin/bash
projectFile=$(find $1 -name "*.sublime-project" -maxdepth 1)
echo $projectFile
if [ $projectFile ]
then
subl $projectFile
else
subl $1
fi