Skip to content

Instantly share code, notes, and snippets.

View crecotun's full-sized avatar

Alexei Crecotun crecotun

View GitHub Profile
@crecotun
crecotun / dabblet.css
Created February 28, 2012 19:53
Untitled
div {
border-radius: 3px;
height: 3px;width: 100px;
border:0;
border-bottom: 1px solid #000;
}
@crecotun
crecotun / hack.sh
Created April 5, 2012 19:50 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
iframe {
visibility: hidden;
position: absolute
top: -9999px;
left: -9999px;
}
@crecotun
crecotun / reset.styl
Created January 23, 2014 10:22
Eric Meyer reset in stylus format
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,
@crecotun
crecotun / px to rem
Last active March 25, 2018 16:39
px to rem converter stylus mixin
rem()
values = ()
for i in arguments
push(values, i/16 rem)
return values
// e.g. padding rem(94px 0 75px)
@crecotun
crecotun / .coffee
Last active August 29, 2015 14:11
iconfont example
# generate iconfont from svgs
gulp.task 'common:iconfont', ->
gulp.src config.paths.src.common.svg.icons.all
.pipe g.iconfont
fontName: "icons"
appendCodepoints: true
normalize: true
.on 'codepoints', (codepoints) =>
codepoints.forEach (glyph, idx, arr) ->
arr[idx].codepoint = glyph.codepoint.toString(16)
@crecotun
crecotun / self-invoking.js
Last active August 29, 2015 14:22
Patterns
// Self invoking object
({
default: "Default",
init: function(name) {
var name = name ? name : this.default
console.log( "Hi, " + name );
}
}).init('Alex')
// self invoking function
// js node
(function($node) {
if ($node.length) {
$node.el = $('.node--el', $node.el);
$node.el.show();
}
})( $('.node') );
@crecotun
crecotun / core.cson
Last active September 11, 2015 12:08
backbone module core
'.source.coffee':
'Core Backbone App':
'prefix': 'bb_module'
'body': '''
define [
'jquery'
'lodash'
'backbone'
'handlebars'