Skip to content

Instantly share code, notes, and snippets.

@dotnetCarpenter
dotnetCarpenter / dabblet.css
Last active September 27, 2016 19:29
Minimum required to set an underline that can be animated
/**
* Minimum required to set an underline that can be animated
*/
.f-jons-demo1 h2 {
display: inline; /* an inline element only takes up the size of its content (the content is "Hello World") */
color: darkred;/* not needed - set the color of the text */
background: linear-gradient(grey, grey) bottom / 100% .1em no-repeat;
}
/* The above can also be written like this: */
@dotnetCarpenter
dotnetCarpenter / dabblet.css
Last active September 27, 2016 16:35 — forked from LeaVerou/dabblet.css
Text-underline-animation
/**
* Text-underline-animation
*/
a {
font-size: 500%;
text-decoration: none;
background: linear-gradient(currentColor, currentColor) bottom / 0 .1em no-repeat;
transition: 1s background-size;
}
//
// Golden Ratio Typography
// --------------------------------------------------
// Golden Ratio Math
//
// Let's do some math so we can build beautiful typography and vertical rhythm.
// For any magic to happen, set the $ContentWidth variable on _variables.scss
// to match your content box width (normally this is 640px, 740px, etc...).
@dotnetCarpenter
dotnetCarpenter / taptest2
Created January 6, 2016 11:16
https://github.com/tapjs/node-tap/issues/199 - output of running tap test/*.js -C --coverage
TAP version 13
# Subtest: test/304.js
# Subtest: 304_not_modified
ok 1 - first request should be a 200
ok 2 - second request should be a 304
ok 3 - should return a strong etag
1..3
ok 1 - 304_not_modified # time=212.235ms
# Subtest: 304_not_modified_weak
@dotnetCarpenter
dotnetCarpenter / taptest
Created January 5, 2016 21:54
https://github.com/tapjs/node-tap/issues/199 - output of running tap test/*.js -C --coverage
TAP version 13
# Subtest: test/304.js
# Subtest: 304_not_modified
ok 1 - first request should be a 200
ok 2 - second request should be a 304
ok 3 - should return a strong etag
1..3
ok 1 - 304_not_modified # time=224.058ms
# Subtest: 304_not_modified_weak
module.exports = function(grunt) {
// grunt.registerTask('custom', 'Add a custom task to grunt', function() {
// ;
// }
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
cssmin: {
compress: {
files: {
var empty_list = function(selector) {
return selector(undefined, undefined, true);
};
var prepend = function(el, list) {
return function(selector) {
return selector(el, list, false);
};
};
var head = function(list) {
@dotnetCarpenter
dotnetCarpenter / lorem.html
Created May 9, 2013 10:28
HTML skeleton for designing vertical rhythm
<article>
<h1>HTML Ipsum Presents</h1>
<p>
<strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.
</p>
<h2>Header Level 2</h2>
<ol>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
</ol>
@dotnetCarpenter
dotnetCarpenter / httrack upgrade
Created April 24, 2013 13:09
In conjunction with https://github.com/mxcl/homebrew/issues/19292 On OS X 10.7.5 (Lion) brew --version 0.9.4
brew upgrade httrack
==> Upgrading 1 outdated package, with result:
httrack 3.47.2
==> Upgrading httrack
==> Downloading http://download.httrack.com/httrack-3.47.2.tar.gz
######################################################################## 100,0%
==> ./configure --prefix=/usr/local/Cellar/httrack/3.47.2 --enable-shared=no
==> make install
_hts_convertStringToUTF8_ in libhttrack.a(htscharset.o)
ld: symbol(s) not found for architecture x86_64
@dotnetCarpenter
dotnetCarpenter / grid.js
Created April 11, 2013 12:19
Super simple grid overlay implemented in nodejs.
var utils = require("util");
var columns = num = 40, // number of columns in the grid
width = 98,
css = "",
cssAll = [""/*placeholder for class names*/, "{ float:left; }"],
html = "",
styles = ["position:absolute;background-color:rgba(0,0,0,0.2)", "position:absolute;"],
style;
while (num > 0) {
style = style[num % 2];