Skip to content

Instantly share code, notes, and snippets.

View aarongarciah's full-sized avatar
💻
Solving problems so you don't have to

Aarón García Hervás aarongarciah

💻
Solving problems so you don't have to
View GitHub Profile
@aarongarciah
aarongarciah / valign-inline-block.css
Last active August 29, 2015 14:22
Vertical align an inline-block element using parents pseudo element :before or :after. Doesn't matter the height of the parent or the height of the element.
#parent { font-size: 0px; }
#parent:before { content: ''; display: inline-block; height: 100%; vertical-align: middle; }
#element { display: inline-block; vertical-align: middle; font-size: 10px; }
@aarongarciah
aarongarciah / placeholder.css
Created June 3, 2015 09:57
Placeholder Style
/* WebKit browsers */
::-webkit-input-placeholder {
color: rgba(#fff, .2);
}
/* Mozilla Firefox 4 to 18 */
:-moz-placeholder {
color: rgba(#fff, .2);
}
/* Mozilla Firefox 19+ */
::-moz-placeholder {
<html>
<head>
<link rel="stylesheet" href="layout.css" />
</head>
<body>
<div class="wrapper">
<p>Your website content here.</p>
<div class="push"></div>
</div>
<footer>
@aarongarciah
aarongarciah / breakpoints.css
Last active August 29, 2015 14:23
Importing CSS Breakpoints Into Javascript by @Mikeherchel
body:before {
content: "smartphone";
display: none; /* Prevent from displaying. */
}
@media (min-width: 700px) {
body:before {
content: "tablet";
}
}
@media (min-width: 1100px) {
@aarongarciah
aarongarciah / Default (OSX).sublime-keymap
Last active August 29, 2015 14:26 — forked from beaugunderson/Default (OSX).sublime-keymap
Sublime Text macros for converting to and from 2 and 4 space indentation
[
{
"keys": ["super+shift+a"],
"command": "expand_selection",
"args": {"to": "tag"} },
{
"keys": ["ctrl+2"],
"command": "run_macro_file",
"args": {
"file": "Packages/User/to-2.sublime-macro"
@aarongarciah
aarongarciah / subl.sh
Created August 5, 2015 09:00
Open Sublime Text from command line
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /bin/subl
@function long-shadow($direction, $length, $color, $fade: false, $shadow-count: 100) {
$shadows: ();
$conversion-map: (
to top: 180deg,
to top right: 135deg,
to right top: 135deg,
to right: 90deg,
to bottom right: 45deg,
to right bottom: 45deg,
to bottom: 0deg,
@aarongarciah
aarongarciah / dabblet.css
Created August 26, 2015 16:09 — forked from csssecrets/dabblet.css
Zebra striped text lines
/**
* Zebra striped text lines
*/
pre {
padding: .5em;
line-height: 1.5;
background: hsl(20, 50%, 95%);
background-image: linear-gradient(
rgba(120,0,0,.1) 50%, transparent 0);
@aarongarciah
aarongarciah / .bash_profile
Last active January 23, 2016 18:38
Custom terminal commands in OSX. Restart the terminal and the changes will take effect.
alias w='cd ~/www'
alias gs='gulp serve'
@aarongarciah
aarongarciah / vbox.sh
Created October 27, 2015 07:16
Running VirtualBox From the Terminal
Start VM
$ VBoxManage startvm "[NAME_OF_YOUR_VM]" --type headless
Send Shutdown Signal
$ VBoxManage controlvm "[NAME_OF_YOUR_VM]" acpipowerbutton
Power Off
$ VBoxManage controlvm "[NAME_OF_YOUR_VM]" poweroff