Skip to content

Instantly share code, notes, and snippets.

View ivolivares's full-sized avatar
🤙
Probably coding!

Iván Olivares R. ivolivares

🤙
Probably coding!
View GitHub Profile
@ivolivares
ivolivares / perfectelementary.bash
Last active August 29, 2015 14:27
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Clean-up System
sudo apt-get purge midori-granite
sudo apt-get purge noise
sudo apt-get purge software-center
@ivolivares
ivolivares / chrome_ubuntu.sh
Created August 14, 2015 17:34
Install Google Chrome Stable Version (Ubuntu, Debian and derivative systems 32 and 64 bits)
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
sudo apt-get install google-chrome-stable
@ivolivares
ivolivares / min-font.css
Created March 25, 2015 17:57
[idea] setting a minimum font-size
:root {
font-size: calc(16px + 3vw);
}

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
<meta name="viewport" content="width=device-width">
@ivolivares
ivolivares / mq.js
Last active August 29, 2015 14:14 — forked from incompl/mq.js
var $ = function(selector, context) {
if (context === undefined) {
context = document;
}
var nl = context.querySelectorAll(selector);
return Array.prototype.slice.call(nl);
};
@ivolivares
ivolivares / slug.js
Last active May 10, 2023 07:26 — forked from bentruyman/slug.js
// Generates a URL-friendly "slug" from a provided string.
// For example: "This Is Great!!!" transforms into "this-is-great"
function generateSlug (value) {
// 1) convert to lowercase
// 2) remove dashes and pluses
// 3) replace spaces with dashes
// 4) remove everything but alphanumeric characters and dashes
return value.toLowerCase().replace(/-+/g, '').replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '');
};
@ivolivares
ivolivares / InstallGearman.md
Last active August 28, 2016 07:05
Install Gearman on OS X

Install Gearman

OSx 10.9.2 Mavericks ++ use brew: brew install -v gearman

If you get an error during the build:

==> make install
#  include <tr1/cinttypes>
           ^

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation