This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
number_format = (num) -> | |
dot = (num = num + "").indexOf(".") | |
if dot is -1 | |
dot = num.length | |
num = num + ".00" | |
last = num.substr(dot).substr(0,3) | |
first = num.substr(0, dot) | |
rem = first.length % 3 | |
middle = first.substr(rem) | |
first = first.substr(0, rem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Goto a directory you can write to: | |
cd ~ | |
#get composer: | |
curl -s https://getcomposer.org/installer | php | |
# move composer into a bin directory you control: | |
sudo mv composer.phar /usr/local/bin/composer | |
# double check composer works | |
composer about |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // require '/var/www/vinay/node/chat/error.php'; | |
$dir = '/var/www/bgd_admin/app/models'; | |
$what = 'quote'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://npmjs.org/install.sh | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
body { background: #f6f6f6; } | |
textarea { width: 100%; border: 1px inset #ddd; padding: 5px; font-family: sans-serif; background: #f9f9f9; } | |
textarea:focus { outline: 2px solid #25547b; border-radius: 5px; } | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$linked_in = 'http://www.linkedin.com/shareArticle?mini=true&url='; | |
$facebook = 'https://www.facebook.com/sharer/sharer.php?u='; | |
$twitter = 'https://mobile.twitter.com/home?status='; | |
$link = $twitter . urlencode('http://www.briangavindiamonds.com/diamonds/diamond-details/0.822-g-vs2-round-diamond-ags-104063637016'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) { | |
text-shadow: @string; | |
} | |
.box-shadow (@string) { | |
-webkit-box-shadow: @string; | |
-moz-box-shadow: @string; | |
box-shadow: @string; | |
} | |
.drop-shadow (@x: 0, @y: 1px, @blur: 2px, @spread: 0, @alpha: 0.25) { | |
-webkit-box-shadow: @x @y @blur @spread rgba(0, 0, 0, @alpha); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Transparent | |
data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw== | |
# White | |
data:image/gif;base64,R0lGODlhAQABAIAAAP7//wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin webfont($font : list of items) | |
{ | |
$url: "//fonts.googleapis.com/css?family="; | |
$font : unquote($font); | |
$i : 0; | |
@each $word in $font { | |
$i : $i + 1; | |
$url : $url + $word; | |
@if( $i < length($font) ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Flickr Loading Animation</h1> | |
<div class="loader"> | |
<i class="dot-pink"></i> | |
<i class="dot-blue"></i> | |
</div> | |
<p>…as seen in the new Flickr iOS app.</p> |