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 / sublimeContextMenu.bat
Created February 10, 2016 21:14
Add "Edit with Sublime Text 3" when right clicking a file on Windows
:: Courtesy of http://wordpress-corner.com/add-open-sublime-text-3-windows-explorer-context-menu/
@echo off
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe
:: add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
@allejo
allejo / _baseExcel.scss
Created January 24, 2016 09:07
A number system using MS Excel's column counting method, written entirely in Sass. Just because.
$_base: "abcdefghijklmnopqrstuvwxyz";
@function power ($x, $n) {
@if $n == 0 {
@return 1;
}
$ret: 1;
@if $n >= 0 {
@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: {
@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 / 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 / SassMeister-input-HTML.html
Created April 22, 2015 05:40
Generated by SassMeister.com.
test
<hr />
test
<hr class="test" />
test
@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 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 / 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 / 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