Skip to content

Instantly share code, notes, and snippets.

View philippbosch's full-sized avatar

Philipp Bosch philippbosch

View GitHub Profile
@philippbosch
philippbosch / cross-browser-rgba-mixin.scss
Created July 19, 2010 10:49
image-less RGBA backgrounds for real browsers and Internet Explorer
@mixin rgba-background($color, $opacity) {
background-color: $color;
background-color: rgba($color, $opacity);
background-color: transparent\9;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{'#'+hex(round($opacity*255)) + '' + hex(red($color)) + '' + hex(green($color)) + '' + hex(blue($color))},endColorstr=#{'#'+hex(round($opacity*255)) + '' + hex(red($color)) + '' + hex(green($color)) + '' + hex(blue($color))});
zoom: 1;
}

1.0 TODO

Antares v0.11

The focus on this release is to get the compass stylesheet libraries and docs as close to final for 1.0 as possible.

  1. Upgrade to Blueprint 1.0
  2. DONE Upgrade stylesheets
@aaronrussell
aaronrussell / background_noise_function.rb
Created March 5, 2011 18:24
Sass implementation of the Noisy jquery plugin: https://github.com/DanielRapp/Noisy
require "rubygems"
require "chunky_png"
require "base64"
module Sass::Script::Functions
def background_noise(c, noise = 0.5, opacity = 0.08, size = 200, mono = false)
# Convert SASS numbers to Ruby classes
noise = noise.to_s.to_f if noise.is_a? Sass::Script::Number
from django.contrib.staticfiles.storage import AppStaticStorage
from django.contrib.staticfiles.finders import AppDirectoriesFinder
class LegacyAppMediaStorage(AppStaticStorage):
source_dir = 'media'
class LegacyAppDirectoriesFinder(AppDirectoriesFinder):
storage_class = LegacyAppMediaStorage
@idan
idan / _more.scss
Created June 6, 2011 08:40
More is Less
$less-column-width: 68px;
$less-gutter-width: 24px;
@function column-width($columns) {
@return ($less-column-width * $columns) + ($less-gutter-width * ($columns - 1));
}
@function grid-padding-px($columns) {
@if $columns == 10 {
@return 48px;
@pamelafox
pamelafox / views.py
Created September 5, 2011 21:26
CORS on Python/Flask
from flask import request, make_response,
def any_response(data):
ALLOWED = ['http://localhost:8888']
response = make_response(data)
origin = request.headers['Origin']
if origin in ALLOWED:
response.headers['Access-Control-Allow-Origin'] = origin
return response
@velocityzen
velocityzen / auth.py
Created September 26, 2011 16:30
This script take pictures from directory and post it to tumblr blog and then delete it. Tumblr API v2! This example for oath file upload.
import urlparse
import oauth2 as oauth
consumer_key = ''
consumer_secret = ''
request_token_url = 'http://www.tumblr.com/oauth/request_token'
access_token_url = 'http://www.tumblr.com/oauth/access_token'
authorize_url = 'http://www.tumblr.com/oauth/authorize'
@puppybits
puppybits / image64.sh
Created January 5, 2012 14:18
Create data URI image from Terminal command
#!/bin/sh
# Examples:
# ./image64.sh myImage.png
# outputs: data:image/png;base64,xxxxx
# ./image64.sh myImage.png -img
# outputs: <img src="data:image/png;base64,xxxxx">
filename=$(basename $1)
xtype=${filename##*.}
append=""
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@mattlenz
mattlenz / image_with_color.rb
Created August 20, 2012 23:27
Solid-color (stretchable) UIImage generator for RubyMotion
# require 'bubble-wrap'
class UIImage
def self.imageWithColor(color)
if color.is_a?(String)
color = color.to_color
end
rect = CGRectMake(0, 0, 1, 1)