Skip to content

Instantly share code, notes, and snippets.

View starzonmyarmz's full-sized avatar

Daniel Marino starzonmyarmz

View GitHub Profile
@starzonmyarmz
starzonmyarmz / bullets_over_list_items.html
Created December 1, 2011 17:38
A solution for getting list bullets above the item - in response to http://dribbble.com/shots/337837-CSS-to-the-Rescue
<!doctype html>
<head>
<style>
body {
margin: 50px;
}
ol {
// Views
var SchoolsView = Backbone.View.extend({
el: $('#ridley_schools table'),
collection: new SchoolList(),
matchingSchools: $('#school_row_template').html(),
initialize: function(){
_.bindAll(this, 'render'); // to solve the this issue
this.collection.bind('reset', this.render);
@starzonmyarmz
starzonmyarmz / css_and_js_experiments.html
Created December 22, 2011 21:48
fooling around with css and javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>untitled</title>
<style>
@starzonmyarmz
starzonmyarmz / css_and_js_experiments_2.html
Created December 23, 2011 02:49
fooling around with css and js some more
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>untitled</title>
<style>
$('#chat_app_input').keypress(function(e) {
if (e.keyCode === 13) {
console.log('enter pressed');
}
return false;
});
@starzonmyarmz
starzonmyarmz / hide-inline-images.js
Created January 20, 2012 19:14
A userscript for Flowdock that adds a button next to inline elements like Tweets and Images that allows you to hide them. Really useful to hide annoying animated gifs and hubot pug bombs
(function () {
setInterval(function(){
$('.image-preview-wrapper').not('.hideBtnAdded').each(function() {
var t = $(this);
if (t.find('.hideImg').length === 0) {
t.append('<button class="hideImg">Hide This Image</button>');
t.addClass('hideBtnAdded');
}
});
Modernizr.load({
test: Modernizr.mq('only screen and (min-width: 768px)'),
yep : ['//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', 'js/plugins.js', '//fonts.googleapis.com/css?family=PT+Sans|PT+Sans+Narrow|Vollkorn:400italic,400'],
complete: function() {
if (window.jQuery) {
var images = '<li><img src="http://dummyimage.com/880x310/efefef/000.png"></li><li><a href="#"><img src="img/slide-marriage.jpg"></a></li><li><a href="#"><img src="http://dummyimage.com/880x310/123/fff.png"></a></li><li><a href="#"><img src="http://dummyimage.com/880x310/999/fff.png"></a></li>';
$('.slides').append(images);
Modernizr.load('js/script.js');
console.log('done');
}
@starzonmyarmz
starzonmyarmz / wunderlist.js
Created February 3, 2012 14:57
Email Redmine issues (tickets) to your Wunderlist inbox using 'mailto'
// Email ticket to my Wunderlist
(function toWunderlist() {
var title = document.title
.replace(' - Cramer Dev', '')
.replace('Scrum Task ', ''),
url = document.location.href;
$('#content').find('.contextual').prepend('<a href="mailto:me@wunderlist.com?body=' + title + ' - ' + url + '" class="to-wunderlist">Add to Wunderlist</a>');
})();
@mixin flag-rag-right($ragClipColor, $ragShadow, $height, $width)
background: red
display: block
height: $height
position: relative
width: $width
&:before,
&:after
@starzonmyarmz
starzonmyarmz / utf-8-bug-fix.sass
Created May 10, 2012 13:43
Best Bug Fix Ever via @smith
/*
* Yeah, so rake:assets:precompile will fail if this file is ascii, and something
* it imports is utf-8. To fix it, here is a snowman: ☃ (no, really.)
*/