Skip to content

Instantly share code, notes, and snippets.

View rocktronica's full-sized avatar
😎
sup

Tommy rocktronica

😎
sup
View GitHub Profile
# You'll need ImageMagick, bub.
for filename in *.jpg
do
start='Description: '
name=$(identify -verbose "$filename" \
| grep -oE "$start.*" \
| cut -c ${#start}- \
| sed -e 's/^[ \t]*//')
@rocktronica
rocktronica / rotating-squares.less
Created July 21, 2014 18:20
rotating-squares.less
.square(@size) {
display: block;
height: @size;
width: @size;
line-height: @size;
text-align: center;
}
@desired-total-width: 100px;
// <p>Before</p>
// <p class="separator">
// Or
// </p>
// <p>Before</p>
.separator {
text-align: center;
position: relative;

Banners and modals

Banner CTAs can be largely navigational:

  • "Upload picture" -> /profile/services/SERVICE_ID/edit/profile-picture
  • "Describe youself" -> /profile/services/SERVICE_ID/edit/services
  • "Email review on my own" -> /profile/services/SERVICE_ID/edit/reviews

Two catches:

(function(doc, undefined) {
var soundEffectStable = [
new Audio("/media/sounds/comical.wav"),
new Audio("/media/sounds/dirp.wav"),
new Audio("/media/sounds/whip-and-bonk.wav"),
];
for (var i = 0; i < 4; i++) {
soundEffectStable = soundEffectStable.concat(soundEffectStable);
}
@rocktronica
rocktronica / gist:1592913
Created January 11, 2012 03:49
onefilecms 1.1.3
<?php /*
OneFileCMS - http://onefilecms.com/
an iamnotagoodartist project - http://iamnotagoodartist.com/
Protected by a Creative Commons "Attribution Non-Commercial Share Alike" License.
http://creativecommons.org/licenses/by-nc-sa/3.0
Free for personal or non-commercial websites. To receive an exception to use this software commercially, please consider purchasing a $20 commercial license.
http://onefilecms.com/license.php
@rocktronica
rocktronica / rotwang
Created January 27, 2012 05:14
JS function timer function, tinker
var rotwang = (function ($, undefined) {
this.timers = {};
this.addTime = function (sTime, iTime) {
this.timers[sTime] = this.timers[sTime] || [];
this.timers[sTime].push(iTime);
};
this.averages = (function () {
$.each(this.timers, function (key, times) {
var iTotal = 0, iCount = 0;
$.each(times, function (i, time) {
@rocktronica
rocktronica / gist:1696006
Created January 28, 2012 22:26
Scraping PMs off the SETV forums
if (!$) { throw "Please jQuerify."; }
var iStart = 180, sName = "Case-Sensitive Name";
var w = window.open();
var $output = $(w.document).find("body").css({
"width": "600px",
"margin": "20px auto",
"font-family": "Sans-Serif"
});
@rocktronica
rocktronica / gist:1700623
Created January 29, 2012 21:01
An Auto-Updating Data URI Text Editor
data:text/html,
<body id='b'>
<textarea spellcheck="false" id="t"></textarea>
<script>
var f,
t = document.getElementById("t"),
@rocktronica
rocktronica / data.json
Created March 6, 2012 22:44
newsletter - tmpltr
{
"Title": "BubbleLife",
"Subtitle": "Park Cities BubbleLife Edition (BETA)",
"Topics": [
{
"Title": "News",
"CssClass": "bigguy",
"Items": [
{