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 / 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 / GSoC 2013 - WordPressMigrationAssistant.md
Created April 10, 2013 19:19
Google Summer of Code 2013 - WordPress Migration Assistant

The goal for WordPress’ Migration Assistant will be to aid in migrating any WordPress blog to a new host or simply changing the domain name of a WordPress blog.

The solution to this problem will be to create a user interface to be part of the administrative control panel where the blog admin will be able to migrate the WordPress blog or simply edit the blog URL, which will go through the current database and change the respective fields to contain the new URL. The blog admin will have two options for migration.

  1. The first option will be to provide FTP and MySQL credentials for the new host and the migration assistant will connect to the new host and start transferring Wordpress files, uploads, plug-ins, themes, and the database; provided the connection was successful.

  2. The second option will be to download a zip file containing the exported database and all of the Wordpress files so you can upload to the new web host and extract all the files there. (The option will also be used as a fallback in case t

@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 / Bluetooth Toggle.scpt
Last active April 8, 2020 00:14
A quick AppleScript that will allow you toggle Bluetooth on and off
-- Requires the 'blueutil' utility that is installed via homebrew
--
-- Find blueutil on GitHub: https://github.com/toy/blueutil
--
-- Note: This will _not_ work with the original blueutil written by Frederik Seiffert
property blueutilPath : "/usr/local/bin/blueutil"
if execBlueutil("power") ends with "0" then
-- Toggle BT on
@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>