Skip to content

Instantly share code, notes, and snippets.

@plugn
plugn / gist:f9e90433ead87560205f
Last active August 29, 2015 14:16 — forked from sgergely/gist:3793166
MC Midnight Commander Shortcut
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@plugn
plugn / gulpfile.js
Last active August 29, 2015 14:27 — forked from andrewdc/gulpfile.js
Simple Static Site Generator with Gulp
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
rubysass = require('gulp-ruby-sass'),
fileinclude = require('gulp-file-include'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
livereload = require('gulp-livereload'),
lr = require('tiny-lr'),
connect = require('gulp-connect'),
@plugn
plugn / index.html
Created September 22, 2015 16:43 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/zuhiga
<!DOCTYPE html>
<html>
<head>
<script src="http://zeptojs.com/zepto.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@plugn
plugn / portforwarding.md
Created October 7, 2015 09:15 — forked from kujohn/portforwarding.md
Port forwarding in Mavericks

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@plugn
plugn / overpass.geojson
Created October 7, 2015 11:36 — forked from anonymous/overpass.geojson
data exported by overpass turbo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@plugn
plugn / request.js
Created October 28, 2015 09:34 — forked from shawnbot/request.js
A lame little JSONP implementation
var request = function(options) {
var aborted = false,
abort = function() {
aborted = true;
};
switch (options.type) {
case "jsonp":
// a very simplistic JSON-P implementation
var script = document.createElement("script"),
@plugn
plugn / regex.js
Created November 5, 2015 11:39 — forked from Integralist/regex.js
The difference between JavaScript's `exec` and `match` methods is subtle but important, and I always forget...
var str = "The quick brown fox jumped over the box like an ox with a sox in its mouth";
str.match(/\w(ox)/g); // ["fox", "box", "sox"]
// match (when used with a 'g' flag) returns an Array with all matches found
// if you don't use the 'g' flag then it acts the same as the 'exec' method.
str.match(/\w(ox)/); // ["fox", "ox"]
/\w(ox)/.exec(str); // ["fox", "ox"]
@plugn
plugn / Collection.js
Created November 10, 2015 15:31
JS ActiveRecord
import Dispatcher, {EventObject} from "Dispatcher";
/**
* Items collection
*/
export default class Collection {
static E_ADD = 'add';
static E_REMOVE = 'remove';
static E_CHANGE = 'change';
@plugn
plugn / ng-md-flex-column.html
Last active February 9, 2016 11:43 — forked from anonymous/index.html
ng md flex column
<html lang="en" >
<head>
<!--http://jsbin.com/gapatikuwo -->
<!-- Angular Material style sheet -->
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
</head>
<body ng-app="BlankApp" ng-cloak>
<style rel="stylesheet">
body {
@plugn
plugn / here-maps-js-api.html
Last active April 8, 2016 12:00 — forked from anonymous/index.html
here maps js api // source http://jsbin.com/tadipi
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<link rel="stylesheet" type="text/css"
href="https://js.api.here.com/v3/3.0/mapsjs-ui.css" />
<script type="text/javascript" charset="UTF-8"
src="https://js.api.here.com/v3/3.0/mapsjs-core.js"></script>
<script type="text/javascript" charset="UTF-8"
src="https://js.api.here.com/v3/3.0/mapsjs-service.js"></script>