Skip to content

Instantly share code, notes, and snippets.

@krusynth
krusynth / style.less
Created Mar 28, 2012
CSS Responsive Framework Less
View style.less
/*
NOTE: There's some magic going on in .cols() to add a negative right margin.
This resolves the the inline-block issue for uncompressed html. However,
it shouldn't be here - you should minify your html instead. This will
be removed in the immediate future.
This is the core framework for the site.
It implements the baseline LESS CSS Mixins and general style rules.
@krusynth
krusynth / gist:2782431
Created May 24, 2012
S3 Uploader for Django
View gist:2782431
# ########################################################
# s3filefield.py
# Extended FileField and ImageField for use with Django and Boto.
#
# Required settings:
# AWS_BUCKET_NAME - String, represents the default bucket name to use if one isn't provided
# AWS_ACCESS_KEY - String
# AWS_SECRET_KEY - String
#
# From here: http://djangosnippets.org/snippets/1976/
@krusynth
krusynth / gallery-core
Created May 29, 2012
Drag and Drop uploader and sorter. A-mazing.
View gallery-core
@krusynth
krusynth / comcast.stylish
Created Jun 8, 2012
Chrome Stylish theme to fix Comcast's awful tv listings
View comcast.stylish
#nav .nav_main {
margin-top: 0px;
width: auto;
}
#nav .nav_main li {
font-size: inherit;
}
#nav .nav_main li a {
@krusynth
krusynth / UploadHandler.js
Created Jun 10, 2012
Drag and Drop uploader javascript class. Nice and condensed.
View UploadHandler.js
/* UploadHandler.js
REQUIRES: jQuery
USAGE:
new UploadHandler(DivName, ArgsHash);
new UploadHandler('#my_div_to_watch', { 'upload_url': '/gallery/post/', 'debug': true });
new UploadHandler(['#div1', '#div2'], { 'upload_url': '/gallery/post/' });
@krusynth
krusynth / bettergradient.less
Created Jun 21, 2012
Better Gradient for LESS CSS
View bettergradient.less
/*
Better Gradient
Better gradient LESS CSS mixin. Lets you start and
stop gradients at arbitrary distances, rather than 100%.
This expands on what is done by lesselements
(which is an awesome package!)
http://lesselements.com
@krusynth
krusynth / typography.less
Created Jun 21, 2012
LESS CSS makes typography sooo much easier.
View typography.less
/******************* TYPOGRAPHY *******************/
/* Variables & Mixins */
/* Fonts & weights */
@font-stack-main: "franklin-gothic-urw-cond", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
@font-weight-book: 400;
@font-weight-medium: 500;
@font-weight-demi: 700;
@krusynth
krusynth / gmaps_api_hax.html
Created Jul 3, 2012
Google Maps API Markers adding custom data to clicks, also Marker Clustering for large numbers of marker pins
View gmaps_api_hax.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
@krusynth
krusynth / cr2tojpeg
Created Aug 16, 2012
Convert CR2 files to JPEGs and resize and greyscale
View cr2tojpeg
for i in *.CR2; do dcraw -c -a -w -v $i | convert - -resize '1000x1000' -colorspace gray $i.jpg; done;
@krusynth
krusynth / featuredposts.php
Created Sep 2, 2012
Wordpress: Featured posts to frontpage
View featuredposts.php
<ul class="gallery-list">
<?php /* Featured galleries */
$parent_id = $post->ID;
$featured_args = array(
'post_type' => 'page',
'meta_key' => 'featured',
'meta_value' => 1,