Skip to content

Instantly share code, notes, and snippets.

@urre
urre / gist:4037485
Created November 8, 2012 08:07
App mode
<!-- iOS status bar style -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- App mode -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Custom Title for homescreen icon (iOS6) -->
<meta name="apple-mobile-web-app-title" content="Sitename">
@urre
urre / gist:4059287
Created November 12, 2012 13:02
Susu responsive grid
$total-columns: 4;
#main {
@include container(4,30em 12); // at min-width 30-em we establish a 12-column grid
section.nav {
@include span-columns(4); // by default we have 4 columns
@include at-breakpoint(30em 12) { // at 30em we want 12 columns
@include span-columns(12); // now we have 12
}
}
@urre
urre / gist:4060461
Created November 12, 2012 16:51
Random colors in SASS
# SASS Random colors ex. background-color: getRandomColor();
# Add to config.rb
module Sass::Script::Functions
def getRandomColor()
Sass::Script::String.new("#%06x" % (rand * 0xffffff))
end
end
@urre
urre / gist:4540826
Last active December 11, 2015 03:49
{
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/tomorrow-theme/textmate/Tomorrow-Night-Eighties.tmTheme",
"find_selected_text": true,
"scroll_past_end": true,
"folder_exclude_patterns":
[
".svn",
".git",
@urre
urre / gist:5244404
Last active November 28, 2017 02:44
WordPress ignore
.htaccess
wp-config.php
xmlrpc.php
wp-content/uploads/
wp-content/blogs.dir/
wp-content/upgrade/*
wp-content/backup-db/*
wp-content/advanced-cache.php
wp-content/wp-cache-config.php
wp-content/cache/*
@urre
urre / gist:6975034
Created October 14, 2013 12:46
curl gmaps
<?php
/* gets the data from a URL */
function get_data($url) {
$ch = curl_init();
$timeout = 5;
$options = array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => 1,
@urre
urre / gist:7037244
Last active December 25, 2015 20:39
Trello theme for Stylish
/** Modified Trello theme. Use with Stylish for Chrome. @urre
Preview: http://cl.ly/image/0l1x1D2w2M0x
Remove 33-41 if you dont need the Superprints logo :)
*/
html,
body,
input,
select,
textarea { font-size: 16px !important }
@urre
urre / nginbox
Last active December 27, 2015 02:09
Nginbox: Custom Domain for Dropbox Public Directory
server{
listen 80;
server_name dropbox.urre.me
location / {
set $index index.html;
rewrite ^.*\/$ $fastcgi_script_name$index last;
proxy_pass https://dl.dropboxusercontent.com/u/XXXXXXX/;
proxy_redirect off;
var MyRouter = Backbone.Router.extend({
routes: {
"/foo": "foo"
},
foo: function(){
myController.doFoo();
}
@urre
urre / gist:8039091
Last active December 31, 2015 20:19
A little convenient SASS mixin for Animate.css
/**
* A little convenient SASS mixin for Animate.css (https://daneden.me/animate/)
* by @urre 131219
* Usage: @include superanimate(fadeInUp, 1.2s, .6s);
*/
@mixin superanimate($animationtype, $duration, $delay) {
opacity :1;