Skip to content

Instantly share code, notes, and snippets.

@marcialca
marcialca / yarn.rb
Last active January 24, 2018 23:47
class Yarn < Formula
desc "JavaScript package manager"
homepage "https://yarnpkg.com/"
url "https://github.com/yarnpkg/yarn/archive/v0.28.4.tar.gz"
sha256 "6cfe82e530ef0837212f13e45c1565ba53f5199eec2527b85ecbcd88bf26821d"
bottle :unneeded
depends_on "node" => :recommended
require 'formula'
class Varnish3 <Formula
url 'https://varnish-cache.org/_downloads/varnish-3.0.4.tgz'
homepage 'http://www.varnish-cache.org/'
depends_on 'pkg-config' => :build
depends_on 'pcre' => :build
# needs
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
/*!
An experiment in getting accurate visible viewport dimensions across devices
(c) 2012 Scott Jehl.
MIT/GPLv2 Licence
*/
function viewportSize(){
var test = document.createElement( "div" );
test.style.cssText = "position: fixed;top: 0;left: 0;bottom: 0;right: 0;";
@marcialca
marcialca / SassMeister-input.scss
Created November 19, 2014 22:42
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
// List map-like value getter
// -------------------
// To simulate associative arrays
// Source: http://hugogiraudel.com/2013/08/12/sass-functions/#mapping
@marcialca
marcialca / SassMeister-input-HTML.html
Last active August 29, 2015 14:07
Generated by SassMeister.com.
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis, praesentium ipsam officia ratione laboriosam, aspernatur, consequatur dolorem quibusdam minima at, fuga aliquam? Maxime architecto, nesciunt ea impedit mollitia! Nesciunt, quia.</p>
@marcialca
marcialca / SassMeister-input.scss
Last active August 29, 2015 14:06
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@function map-getter($listmap, $value) {
@each $item in $listmap {
$index: index($item, $value);
@if $index {
$return: if($index == 1, 2, $index);
@marcialca
marcialca / SassMeister-input.scss
Created September 25, 2014 21:22
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@mixin query($breakpoint, $orientation:portrait, $qval: min) {
@if $breakpoint == 'small' {}
@if $breakpoint == 'medium' {}
@if $breakpoint == 'large' {}
@else {
#! /usr/bin/env bash
if [ -z "$1" ]; then
echo "Please specify a directory as the first argument."
exit 1
fi
if [ ! -d "$1" ]; then
echo "Not a valid directory."
exit 1
fi
@marcialca
marcialca / jshintrc
Created July 14, 2014 16:52
JsHint Config Example
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope