Skip to content

Instantly share code, notes, and snippets.

@jonikorpi
jonikorpi / gist:3924046
Created October 20, 2012 17:08
All viewport rules in one place
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<style>
@-ms-viewport {width: device-width;}
@viewport {width: device-width;}
</style>
@jonikorpi
jonikorpi / gist:4266172
Created December 12, 2012 08:45
Awesome HTML5 placeholder fallback
# If browser doesn't support placeholders, take the placeholder text and set it as the field's value
unless Modernizr.input.placeholder
$("input[placeholder]").each (index, element)->
unless $(element).val()
$(element).val($(element).attr("placeholder"))

Ohjeita

Jos haluatte, että kuvat näyttävät tarkoilta isoilla Retina-näytöillä (esim. Retina Macbook Pro), käyttäkää alla suluissa olevia Retina-kokoja ja alentakaa kuvan JPG-qualityä reilusti. Tätä kutsutaan "compressive images" -tekniikaksi. Lisätietoja: http://blog.netvlies.nl/design-interactie/retina-revolution/

Jos teitä ei haittaa kuvien suttuisuus isoilla Retina-näytöillä, käyttäkää alla listattuja normaaleja kokoja. Tämä nopeuttaa sivun latautumista ja vähentää sen kaatumisen todennäköisyyttä alitehoisilla laitteilla (esim. iPad 1).

Kuvien koot

Kuvien DPI:n tulisi aina olla 72. Tämä pätee myös Retina-kuviin.

@mixin georgia {
font-family: 'GeorgiaProW01-Regular', Arial, serif;
}
@mixin georgia-italic {
font-family: 'GeorgiaProW01-Italic', Georgia, serif;
font-style: normal; // Has to be set like this, because fonts.com serves each font in a family separately
.wf-inactive & { font-style: italic; } // Fallback, in case fonts.com fails
}

Armoury system

The Armoury System is FFXIV's class system.

  • Start the game as a Class.
  • Class is based on equipped weapon - Gladiator/Sword - Marauder/Axe - Lancer/Lance - Pugilist/Fist Weapon - Archer/Bow - Conjurer/Staff - Thaumaturge/Rod - Arcanist/Book -
  • Traits are for the class you currently are only.
  • Classes can use cross-class abilities from other classes. As you level up, you gain more ability slots for cross-class abilities (10 slots at level 50).
  • Classes can use certain abilities from every other class. For example, you can equip the Pugilist's "Internal Release" and Lancer's "Blood for Blood" as a Gladiator.
  • Your class can be changed in the field by changing your weapon once you unlock the Armoury System at level 10.
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
.fieldset-footer,
.hint,
input[type="submit"],
button,
.button,
.error,
@jonikorpi
jonikorpi / styles.less
Last active September 7, 2016 16:23
Atom stylesheet based around Solarized Dark, Input Mono, and Input Sans Narrow
/*
I should probably have turned this into a theme…,
but who has time for that?
Installation:
1. Choose "Atom Dark" as your UI theme.
2. Choose "Solarized Dark" as your syntax theme.
3. Install Input from http://input.fontbureau.com/
(It's free for personal use.)
The definition of a rathole:
My TV torrents stopped downloading.
Turns out my primary TV torrent feed changed to magnet links.
Turns out my autodownloader doesn't know how to pass magnet links to my torrent client.
Changed to another client.
*mysterious errors*
Turns out the client has to be installed in Program Files instead of Program Files (x86).
Uninstalling it and reinstalling it there.
*other mysterious errors*
Turns out the client has to be installed with the same version of Python as the autodownloader.
@jonikorpi
jonikorpi / gist:bc98be0dfdaa92d99cc0
Last active August 29, 2015 14:19
Getting pg to work with Ruby 1.9.3
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config
If you run in to missing headers problem, try specifying the include directory of the app:
gem install pg -- --with-pg-include='/Applications/Postgres.app/Contents/Versions/9.4/include/'