$ history | awk '{print $2}' | awk 'BEGIN {FS="|"}{print $1}' | sort | uniq -c | sort -nr | headCredit goes to: http://stackoverflow.com/a/68390/538570
| .flair-somename { | |
| background: #000; | |
| border: 1px solid #000; | |
| color: #fff; | |
| } | |
| /* Theme: DSCVRY by doingstuffcarl/jillpatel (/r/dscvry) | |
| Night Mode: nm.reddit.com/r/YOUR_SUBREDDIT */ |
| function bind(m, g) { | |
| if (m === null) { return null; } | |
| return g(m); | |
| } | |
| function getBothGrandFathers(p) { | |
| return bind(father(p), function (dad) { | |
| return bind(father(dad), function (gf1) { | |
| return bind(mother(p), function (mom) { | |
| return bind(father(mom), function (gf2) { |
| function Monad(a) { | |
| this._value = a; | |
| } | |
| /** | |
| * callback: (err: Error, isEqual: boolean) | |
| */ | |
| Monad.prototype.value = function (callback) { | |
| setImmediate(callback.bind(null, null, this._value)); | |
| }; |
$ history | awk '{print $2}' | awk 'BEGIN {FS="|"}{print $1}' | sort | uniq -c | sort -nr | headCredit goes to: http://stackoverflow.com/a/68390/538570
| var assert = require('assert'); | |
| function Monad(a) { | |
| this._value = a; | |
| } | |
| Monad.unit = function (a) { | |
| return new Monad(a); | |
| }; |
| 'use strict'; | |
| class Monad { | |
| constructor(a) { this._value = a; } | |
| '>>='(f) { return f(this.value()); } | |
| static create(a) { return new Monad(a); } | |
| value() { return this._value; } | |
| } | |
| var val = Monad.create(10) ['>>='] |
| #!/bin/sh | |
| # size of swapfile in megabytes | |
| swapsize=8000 | |
| # does the swap file already exist? | |
| grep -q "swapfile" /etc/fstab | |
| # if not then create it | |
| if [ $? -ne 0 ]; then |
| var LayoutItemView = Backbone.Marionette.ItemView.extend({ | |
| render: function () { | |
| var retval = | |
| Backbone.Marionette.ItemView.prototype.render.call(this, arguments); | |
| var self = this; | |
| if (typeof this.regions === 'object') { | |
| _.each(_.keys(this.regions), function (key) { | |
| var view = self.regions[key](self.model); | |
| view.render(); |
| function quicksort ([x, ...xs]) { | |
| if (x === undefined) { return xs; } | |
| return [ ...quicksort([for (a of xs) if (a <= x) a]), x, | |
| ...quicksort([for (a of xs) if (a > x) a]) ]; | |
| } |