Skip to content

Instantly share code, notes, and snippets.

View DanCouper's full-sized avatar

Dan Couper DanCouper

  • Strive Gaming
  • Newcastle, UK
  • 10:43 (UTC +01:00)
  • X @DanCouper
View GitHub Profile
@DanCouper
DanCouper / reset.styl
Created October 22, 2013 14:15
Stylus Version of Meyer reset.
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p,
blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img,
ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i,
center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section,
summary, time, mark, audio, video
margin 0
padding 0
border 0
@DanCouper
DanCouper / typeplate.styl
Last active December 26, 2015 05:39
Conversion of core Typeplate file to stylus, building in some of the items from the newest SCSS version. @todo icons - currently, Compass is used for the SCSS version. Needs looking at in detail to see if it can be replicated. @todo replicate the base font family/sizing etc wizardry
/*!
+---------------------------------------------------------------------+
| _ _ _ |
| | |_ _ _ _ __ ___ _ __ | | __ _ | |_ ___ |
| | __|| | | || '_ \ / _ \| '_ \ | | / _` || __|/ _ \ |
| | |_ | |_| || |_) || __/| |_) || || (_| || |_| __/ |
| \__| \__, || .__/ \___|| .__/ |_| \__,_| \__|\___| |
| |___/ |_| |_| |
| |
| |
@DanCouper
DanCouper / typography.md
Last active August 29, 2015 13:56
Various notes on :advanced font rules, many not widely implemented.

Order of precedence in application of feature

General and font specific font feature property settings are resolved in the order below, in ascending order of precedence. This ordering is used to construct a combined list of font features that affect a given text run.

  1. Font features enabled by default, including features required for a given script.
  2. If the font is defined via an @font-face rule, the font features implied by the font-variant descriptor in the @font-face rule.
  3. If the font is defined via an @font-face rule, the font features implied by the font-feature-settings descriptor in the @font-face rule.
  4. Font features implied by the value of the ‘font-variant’ property, the related ‘font-variant’ subproperties and any other CSS property that uses OpenType features (e.g. the ‘font-kerning’ property).
  5. Feature settings determined by properties other than ‘font-variant’ or ‘font-feature-settings’. For example, se
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@DanCouper
DanCouper / if_programming_languages_were_cars.md
Last active December 6, 2024 02:05
If programming languages were cars...

Ada is a tank. A butt-ugly tank that never breaks down. People laugh uncontrollably if you tell them you drive Ada, but really, do you want to be driving a sports car in a war zone? (from Amit Dubey)

Assembly Language is a bare engine; you have to build the car yourself and manually supply it with gas while it's running, but if you're careful it can go like a bat out of hell.

(From "Subterfug" off digg.com:) Assembly Language: you are the car.

Basic is a simple car useful for short drives to the local shops. Once popular with learner drivers, it has recently been stripped down to a shell and rebuilt by a major manufacturer, The new version has been refurbished for longer journeys, leaving only cosmetic similarities to the original model. (from Przemyslaw Wrzos)

C is a racing car that goes incredibly fast but breaks down every fifty miles.

var extend = function(a, b) {
for (var i in b)
a[i] = b[i];
return a;
};
var fluent = function(f) {
return function() {
var clone = extend(Object.create(null), this);
f.apply(clone, arguments);
/**
* Performs a binary search on the host array. This method can either be
* injected into Array.prototype or called with a specified scope like this:
* binaryIndexOf.call(someArray, searchElement);
*
* @param {*} searchElement The item to search for within the array.
* @return {Number} The index of the element which defaults to -1 when not found.
*/
function binaryIndexOf(searchElement) {
'use strict';
@DanCouper
DanCouper / patterngrid
Created April 8, 2015 14:58
Use of SVG pattern to create a PS-like transparency grid
<!-- http://mike.eire.ca/2010/02/25/easy-svg-grid/ -->
<!-- "I needed a grid in the background while I was debugging an SVG image I was creating, something like Photoshop’s transparency grid. Here’s what I did." -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="400">
<defs>
<pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse">
<rect fill="black" x="0" y="0" width="10" height="10" opacity="0.1"/>
<rect fill="white" x="10" y="0" width="10" height="10"/>
<rect fill="black" x="10" y="10" width="10" height="10" opacity="0.1"/>
<rect fill="white" x="0" y="10" width="10" height="10"/>