Skip to content

Instantly share code, notes, and snippets.

View marciobarrios's full-sized avatar

Marcio Barrios marciobarrios

View GitHub Profile
@marciobarrios
marciobarrios / styles.less
Last active March 7, 2017 14:45
Operator Mono in Atom
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
@marciobarrios
marciobarrios / init.coffee
Last active March 6, 2017 17:52
Atom Sync
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@marciobarrios
marciobarrios / Preferences.sublime-settings
Last active August 31, 2015 14:00
Sublime Text 3 settings (place it in ~/Library/Application Support/Sublime Text 3/Packages/User/)
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.dark (SL).tmTheme",
"font_face": "Source Code Pro",
"font_size": 13,
"highlight_line": true,
"ignored_packages":
[
"JavaScript",
"Vintage"
@marciobarrios
marciobarrios / Preferences.sublime-settings
Created September 6, 2014 13:28
Sublime preferences
{
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": ".",
"selector": "source.js"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0">
<!-- Prefetch DNS for external assets (Twitter widgets etc). -->
<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link rel="dns-prefetch" href="//platform.twitter.com">
<link rel="dns-prefetch" href="//www.google-analytics.com">
@marciobarrios
marciobarrios / break-word.css
Last active August 29, 2015 13:58
Cross browser solution to break words using CSS
.break-word {
/* Only if you support old browsers without hyphenation, break-all forces
to break the word, sometimes leaving one character in a line */
-ms-word-break: break-all;
word-break: break-all;
/* Non standard for webkit */
word-break: break-word;
-webkit-hyphens: auto;
@marciobarrios
marciobarrios / retina-sprites.scss
Last active August 29, 2015 13:58
Retina Sprites for Compass
// =====================================
// Retina Sprites for Compass
// =====================================
//
// Based in https://github.com/Gaya/Retina-Sprites-for-Compass
//
// Usage:
// 1. create two folders in your image directory (for example 'ebp' and 'ebp-2x').
// 2. create sprite images for pixel ratio 1 screens and put them in the first folder.
// 3. create sprite images for pixel ratio 2 screens and put them in the second folder, use the same filenames.
html {
font-size: 62.5%; /* 1 */
}
@function parseInt($n) { /* 2 */
@return $n / ($n * 0 + 1);
}
@mixin rem($property, $values) {
$px : (); /* 3 */
@marciobarrios
marciobarrios / vertical-alignment.css
Last active August 29, 2015 13:57
Vertical Alignment with CSS
/* For modern browsers (IE9+) */
.valign {
position: relative;
top: 50%;
transform: translateY(-50%);
}
/* Alternative for IE8+, apply to a container of an inline-block element
Ex:
<span class="i-box valign">
@marciobarrios
marciobarrios / generate_js_ctags.sh
Last active August 29, 2015 13:57
Generate JS/coffee/CSS ctags for a specific project
#!/bin/bash
# Use:
# Go to the project root, save this file and execute this to create a tags file:
# sh ./generate_js_ctags.sh
# Put here the path to your project
SCAN_DIR=/Users/marcio/Xing/companies/app
ctags \