Skip to content

Instantly share code, notes, and snippets.

View allejo's full-sized avatar
🐢
mr. tortle says hi

Vladimir Jimenez allejo

🐢
mr. tortle says hi
View GitHub Profile
@allejo
allejo / urlFetcher.rb
Last active August 29, 2015 14:06
Read through an HTML file of anchor tags, parse all of the hyperlinks, and download them
#!/usr/bin/ruby
#
# License: Public Domain
line_number = 0;
dry_run = ARGV[1]
if ARGV[0].nil? || ARGV[0].empty?
puts "Usage: ruby urlFetcher.rb [FILE_PATH] [OPTION]"
puts ""
@allejo
allejo / SassMeister-input.scss
Created March 12, 2015 18:12
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@for $i from 1 through 4 {
.votes li:nth-of-type(#{$i})
{
background: url('../bilder/keyvisual_#{$i}.png') no-repeat;
}
@allejo
allejo / SassMeister-input-HTML.html
Created March 18, 2015 15:17
Generated by SassMeister.com.
<div class="test">
<div class="col-xs-5th"></div>
<div class="col-xs-5th"></div>
<div class="col-xs-5th"></div>
<div class="col-xs-5th"></div>
<div class="col-xs-5th"></div>
</div>
@allejo
allejo / _flexbox.less
Created March 23, 2015 18:52
A LESS port of Bourbon's flexbox mixins, which include support for the 2009 and 2011 spec of flexbox
// Ported from Bourbon's Flexbox mixins: https://github.com/thoughtbot/bourbon
.display-box {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox; // IE 10
display: box;
}
// Custom shorthand notation for flexbox
@allejo
allejo / SassMeister-input-HTML.html
Created April 22, 2015 05:40
Generated by SassMeister.com.
test
<hr />
test
<hr class="test" />
test
@allejo
allejo / SassMeister-input-HTML.html
Created May 27, 2015 17:02
Generated by SassMeister.com.
<div class="foo-1"></div>
<div class="foo-2"></div>
<div class="foo-3"></div>
<div class="foo-4"></div>
<div class="foo-5"></div>
<div class="foo-6"></div>
@allejo
allejo / getTotalLineCount.sh
Created October 30, 2012 01:42
Total Number of Lines of a Given File Type in a Folder
#!/bin/bash
if [ -z "$1" ] # Check if no argument was passed
then
echo "No extension specified."
exit
fi
# If someone passes * as an argument it'll pass all the
# files in the directory as arguments, so we just need
@allejo
allejo / compress.sh
Last active October 13, 2015 19:18
Minify CSS and JS files in a project
#!/bin/bash
for css_file in css/*
do
if [[ "$css_file" == *".min."* ]]
then
continue
fi
if [[ "$css_file" -nt "${css_file%.*}.min.css" ]]
@allejo
allejo / map-reverse.scss
Created November 17, 2015 07:28 — forked from seanislegend/map-reverse.scss
Reverse the order of a SASS map.
@function mapReverse ($map) {
$result: null;
@if type-of($map) == "map" {
$keys: map-keys($map);
$map-reversed: ();
@for $i from length($keys) through 1 {
$map-reversed: map-merge(
$map-reversed,
@allejo
allejo / Gulpfile.js
Created December 8, 2015 20:50
A Gulp setup for building Jekyll websites with auto-reloading in browsers
var gulp = require('gulp');
var spawn = require('child_process').spawn;
var tinylr = require('tiny-lr')();
var jekyllPid;
function notifyLiveReload(event) {
var fileName = require('path').relative(__dirname, event.path);
tinylr.changed({
body: {