Skip to content

Instantly share code, notes, and snippets.

.red {
background-color: #bf3130;
}
@glynrob
glynrob / gist:5996282
Created July 14, 2013 21:58
SCSS Variables
$red: #BF3130;
.red{
background-color:$red;
}
@glynrob
glynrob / gist:5995147
Created July 14, 2013 18:10
Nested LESS CSS
a{
color:#000000;
&:hover{
color:#CCCCCC;
}
}
@glynrob
glynrob / gist:5995142
Created July 14, 2013 18:10
Nested Less CSS
a{
color:#000000;
}
a:hover{
color:#CCCCCC;
}
.border-radius (@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
.btn{
.border-radius(10px);
}
<div class="container">
<a class="btn red" href="#">Button 1</a>
<a class="btn green" href="#">Button 2</a>
<a class="btn blue" href="#">Button 3</a>
</div>
<link href="styles.less" rel="stylesheet/less" type="text/css" />
<script type="text/javascript" src="http://lesscss.googlecode.com/files/less-1.3.0.min.js"></script>
.red{
background-color:#BF3130;
}
@red: #BF3130;
.red{
background-color:@red;
}
@glynrob
glynrob / gist:5072177
Created March 2, 2013 17:45
Python code to use GnuPG to encrypt a folder and FTP it
import os
import gnupg
import tarfile
import ftplib
# create zip file of the folder
tar = tarfile.open("docs_backup.tar", "w")
tar.add("/home/pi/Documents", arcname="bar")
tar.close()