Skip to content

Instantly share code, notes, and snippets.

@albertgrala
albertgrala / windows_batch.md
Created December 13, 2012 13:26
Windows batch files

Windows Batch Files BAT/CMD

Basics

  • The script must have the extension .bat or .cmd
  • The commands are case-insensitive. You could either use ECHO or echo

Commands

  • title set the window name for the BAT file
  • echo prints a statement
@albertgrala
albertgrala / coffescript.coffee
Created December 9, 2012 00:33
Sandbox: CoffeeScript jQuery hover
# $('.drink li').hover(function() {
# $(this).find('span').show();
# }, function() {
# $(this).find('span').hide();
# });
$('.drink li').hover(
->
$(@).find('span').show()
->
$(@).find('span').hide()
@albertgrala
albertgrala / _edited.css
Created December 8, 2012 15:24
Sandbox: HTML form
#sign-up input[type="submit"] {
float: right;
margin-bottom: 10px;
margin-right: 10px;
padding: 8px 15px;
font: bold 12px "DroidSansBold", Verdana, sans-serif;
text-transform: uppercase;
line-height: 1;
color: #fff;
border: none;
@albertgrala
albertgrala / _edited.css
Created December 8, 2012 15:15
Example: CSS transitions
.news-post {
margin-top: 6px;
padding: 5px 0 5px 10px;
width: 285px;
-webkit-border-top-right-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
-moz-border-radius-topright: 10px;
-moz-border-radius-bottomright: 10px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
@albertgrala
albertgrala / _respond-to.scss
Created December 7, 2012 16:16
SASS: @mixin respond-to
@mixin respond-to($val, $query){
@media ($val : $query){
@content
}
}
// Usage
.example{
@include respond-to(min-width, 900px){
float: none;
@albertgrala
albertgrala / _group.scss
Created December 7, 2012 15:19
SASS: float-clearing
%group {
zoom: 1;
&:before,
&:after {
content: '';
display: table;
}
&:after {
clear: both;
}
@albertgrala
albertgrala / float-clearing.css
Created December 6, 2012 17:07
CSS: float-clearing
/* clearfix */
.group:before,
.group:after {
content: "";
display: table;
}
.group:after {
clear: both;
}
@albertgrala
albertgrala / LICENSE.txt
Created November 7, 2012 18:50 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@albertgrala
albertgrala / gist:3745587
Created September 18, 2012 20:18
HTML: Starting Template
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title></title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
</body>