Skip to content

Instantly share code, notes, and snippets.

View franzheidl's full-sized avatar

Franz Heidl franzheidl

View GitHub Profile
@typemytype
typemytype / defaultFontInfoChanger.py
Created February 22, 2015 20:40
Change default font info values
from lib.settings import defaultFontInfoAttributes
defaultFontInfoAttributes["descender"] = -200
defaultFontInfoAttributes["ascender"] = 800
@jackie
jackie / breakpoints.json
Last active December 19, 2015 15:28
Sass Script function to get breakpoint values from a JSON file.
{
"phone" : "all and (max-width: 603px)",
"desktop": "all and (min-width: 1025px)",
"tablet" : "all and (min-width: 604px) and (max-width: 1024px)"
}
@bendc
bendc / display-fade.html
Created June 22, 2016 03:01
Transitioning the opacity of a hidden element
<!doctype html>
<meta charset="utf-8">
<title>Example</title>
<style>
div {
width: 100px;
height: 100px;
background: black;
animation-duration: .5s;
@LettError
LettError / blinkenDraw.py
Last active March 14, 2018 16:38
Toy script for RF3: draw animated pixels in a tiny window, save to gif.
# coding: utf-8
import os
import vanilla
import mojo.canvas
from mojo.UI import PutFile
from random import random
from mojo.drawingTools import *
import drawBot
from AppKit import NSTimer

An example of a simple form

Consider the following markup:

<form class="root" state:theme=dark state:compact>
  <div class="input-area">
    <label for="username" class="label">Username:</label>
    <input id="username" class="input" type="text">
  </div>
@typemytype
typemytype / randomColorAppIcon.py
Created May 10, 2016 13:55
add random color to app icon
from AppKit import *
from lib.tools.misc import randomColor
# get the application icon image
icon = NSApp().applicationIconImage()
# get the size
w, h = icon.size()
# make a rect with the size of the image
imageRect = NSMakeRect(0, 0, w, h)
# create a new image with the same size
@chriseppstein
chriseppstein / _minified_filenaming.md
Last active November 26, 2019 07:40
compiling a minified version of css. This configures your compass project to emit files in minified form when compiling for production.
$ compass compile --environment production && compass compile

Afterwards you will have both the minified and non-minified versions in your output folder. Note that compass clean will not clean up your minified files.

mymodule {
@at-root {
.#{&}-header { ... }
.#{&}-footer { ... }
.#{&}-body {
a { ... }
span { ... }
p { ... }
}
}
@anotheruiguy
anotheruiguy / web-fonts-asset-pipeline.md
Last active May 24, 2023 22:08
Custom Web Fonts and the Rails Asset Pipeline

Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.

Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.

As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.

The recommended way

Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.

@shawnbot
shawnbot / index.md
Last active August 23, 2023 10:18
Testing web pages with Xcode's iOS Simulator

Finding the Simulator

You can test with the iOS Simulator that comes with Xcode. Navigate to the Xcode app in the Finder, right click and select "Show Package Contents":

screen shot 2013-05-06 at 12 04 27 pm

Then navigate to Contents > Applications, and open the shortcut to "iPhone Simulator" (it may be called "iOS Simulator" depending on which version of Xcode you're running):

screen shot 2013-05-06 at 12 05 45 pm