Skip to content

Instantly share code, notes, and snippets.

View manuhabitela's full-sized avatar
🦆

Emmanuel Pelletier manuhabitela

🦆
View GitHub Profile
@manuhabitela
manuhabitela / _tabs.scss
Last active August 29, 2015 14:00
Simple JS tabs with Backbone
.Tabs-tabs {
@extend .u-inlineList;
}
.Tabs-tab {
}
.Tabs-link {
&:hover,
@manuhabitela
manuhabitela / ubuntu-eol.md
Created October 15, 2015 09:56 — forked from dergachev/ubuntu-eol.md
What to do when your ubuntu distro is End-of-Life

Let's say you're using Ubuntu 13.04 (Raring Ringtail, released in April 2013) and it just went End-of-Life on you, because it's supported for only 6 months, and the deprecated packages are taken down after 12 months.

You'll probably figure this out the hard way. When you run sudo apt-get update, it will eventually report these errors:

Ign http://archive.ubuntu.com raring-updates/universe Sources/DiffIndex
Err http://security.ubuntu.com raring-security/main Sources
  404  Not Found [IP: 91.189.91.15 80]
Err http://security.ubuntu.com raring-security/universe Sources
  404  Not Found [IP: 91.189.91.15 80]
@manuhabitela
manuhabitela / bootstrap-breakpoint-indicator-bookmarklet.js
Last active December 2, 2015 07:52
Bookmarklet showing current bootstrap breakpoint at the top left of the page
(function(){
var script = document.createElement("script");
script.src = "https://rawgit.com/Leimi/122905f66682fb3c4927/raw/source.js";
document.getElementsByTagName("head")[0].appendChild(script);
})();
@manuhabitela
manuhabitela / help_for_word_devdocs.py
Last active December 20, 2015 05:49
Sublime Text 2/3 "help_for_word" command: view docs about the current word on devdocs.io if available, google otherwise
# search for the keyword under the scope on devdocs.io or google if language is not supposedly supported
#
# how to use: bind the "help_for_word" command to a keyboard shortcut
# put your cursor on the language keyword, function, ... you want info on
# trigger the command via the shortcut > devdocs or google is opened on your browser
#
# code is mostly http://dom111.co.uk/files/sublime/plugins/help_for_word.py
# modified to use devdocs.io as the main doc website
import sublime
import sublime_plugin
@manuhabitela
manuhabitela / position.scss
Last active December 23, 2015 10:19
Sass position mixin that uses transforms (translateX/translateY) when available
/** Sass mixins to position stuff with transforms when they're available with Modernizr and with usual position values otherwise
*
* instead of writing `bottom: 7px`, just write `@include bottom(7px)`
**/
@mixin __position($pos, $value) {
html.no-csstransforms & {
#{$pos}: $value;
}
html.csstransforms & {
@if $pos == right or $pos == bottom {
@manuhabitela
manuhabitela / AppController.php
Created October 9, 2013 16:54
CakePHP + Steam OpenID : beginning of some code that will probably never be finished.
<?php
App::uses('Controller', 'Controller');
class AppController extends Controller {
public $components = array(
'Auth' => array(
'authenticate' => array(
'FormValue' => array(
'field' => 'steam_id',
'userModel' => 'User'
@manuhabitela
manuhabitela / casper-conf.js
Created November 13, 2013 20:09
basic casperjs conf
var casper = require('casper').create({
verbose: true,
logLevel: "debug",
viewportSize: { width: 1378, height: 768 }, //for real, my screen is like everyone else's!
pageSettings: {
loadImages: false,
loadPlugins: false,
//I'm using Chrome, I SWEAR
userAgent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36"
},
@manuhabitela
manuhabitela / webplatformdaily.css
Last active December 31, 2015 12:19
Open Web Platform Daily Digest custom stylesheet: focus on content. Easily usable with Stylebot and others.
article {
border: none;
margin: 0 auto;
padding: 0;
}
.banner, .quotes, h1, .patron-count {
display: none;
}
@manuhabitela
manuhabitela / ai-to-svg.sh
Created December 6, 2016 09:13
Batch svg manipulations with Inkscape
#!/bin/bash
# convert all .ai files found in current folder to svg
for file in $(ls *.ai)
do
svg_file=$(echo "$file" | sed "s/.ai/.svg/")
inkscape --without-gui --file=$file --export-plain-svg=$svg_file
done
@manuhabitela
manuhabitela / readme.md
Last active January 24, 2017 10:09
Making Emmet work on my ST3 install

I had trouble making the Emmet plugin work on my Arch+ST3 install. Don't know if it's Arch's fault, or because my installation is starting to get really old… But here is how it worked in the end as of right now:

  • uninstall current Emmet
  • uninstall Package Control (we will reinstall it later)
  • close Sublime Text 3
  • delete all remaining Emmet folders you find in the ~/.config/sublime-text-3 and subdirectories
  • delete PyV8 folders you find in ~/.config/sublime-text-3/Packages and ~/.config/sublime-text-3/Installed Packages
  • delete all Package Control related files and folders except ~/.config/sublime-text-3/Packages/User/Package Control.sublime-settings
  • start Sublime Text 3