Skip to content

Instantly share code, notes, and snippets.

View 1ambda's full-sized avatar
🦁
in the jungle

Kun 1ambda

🦁
in the jungle
View GitHub Profile
<HTML>
</HTML>
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.github.com/dimitri/el-get/master/el-get-install.el")
(let (el-get-master-branch)
(goto-char (point-max))
(eval-print-last-sexp))))
(el-get 'sync)
(add-hook 'python-mode-hook 'auto-complete-mode)
(add-hook 'python-mode-hook 'jedi:ac-setup)
#foxya {
background: url("../images/fox.jpg") center top no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')";
height: 1080px;
}
.nav-icon {
position: fixed;
width: 32px;
height: 32px;
margin-top: 7px;
background: no-repeat;
}
.nav-icon-github {
background: url("../images/github.png");
.nav-icon {
position: fixed;
width: 32px;
height: 32px;
margin-top: 7px;
background: no-repeat;
}
.nav-icon-github {
background: url("../images/github.png");
@1ambda
1ambda / gist:8204171
Created January 1, 2014 01:53
Bootstrap3 Grid
<!-- Stack the columns on mobile by making one full-width and the other half-width -->
<div class="row">
<div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
</div>
<!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
<div class="row">
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
window.Instance = Backbone.Model.extend({
});
window.Instances = Backbone.Collection.extend({
model : Instance
});
window.InstanceItem = Backbone.View.extend({
tagName : 'tr',
@1ambda
1ambda / gist:8557586
Created January 22, 2014 12:03
mongoDB get Average
db.networkouts.group(
{ cond: {"instance_id": 'i-6da51c6a'}
, initial: {count: 0, total:0}
, reduce: function(doc, out){ out.count++; out.total += doc.average }
, finalize: function(out){ out.avg = out.total / out.count }
} );
@1ambda
1ambda / gist:8558143
Created January 22, 2014 12:46
Mongoose Average Query Example
var CpuUtilization = require('./models/cpu_utilization');
CpuUtilization.aggregate({
// $match: { instance_id: { $gte: 21 }}
$match : {
instance_id : 'i-2d800b2a',
time_stamp : {
// $lt : new Date('Tue Jan 21 2014 19:31:00 GMT+0900 (대한민국 표준시)')
$lt : new Date('2014-01-21 10:31:00.000Z')
}