Skip to content

Instantly share code, notes, and snippets.

View axelav's full-sized avatar
🕸️

Axel Anderson axelav

🕸️
View GitHub Profile
# requires ~/.aws/config or $ aws configure to work
alias inst="aws ec2 describe-instances --output text|grep INSTANCES|cut -f10,14"
@axelav
axelav / package.json
Last active January 28, 2017 01:15
something like this
{
"name": "default-npm-config",
"version": "1.0.0",
"description": "",
"main": "client.js",
"scripts": {
"start": "budo client.js",
"test": "node test/**/*.js"
},
"keywords": [],

Chapter 2: How does zsh differ from...?

As has already been mentioned, zsh is most similar to ksh, while many of the additions are to please csh users. Here are some more detailed notes. See also the article 'UNIX shell differences and how to change your shell' posted frequently to the USENET group comp.unix.shell.

2.1: Differences from sh and ksh

Most features of ksh (and hence also of sh) are implemented in zsh; problems can arise because the implementation is slightly different. Note also that not all ksh's are the same either. I have based this on the 11/16/88f version of ksh; differences from ksh93 will be more substantial.

As a summary of the status:

@axelav
axelav / index.html
Last active October 27, 2016 15:31
<!DOCTYPE html>
<html lang="en">
<head>
<title>One Minute Map</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
<script src="https://mapzen.com/js/mapzen.min.js"></script>
<style>
#map {
height: 100%;
var fs = require('fs-extra')
var got = require('got')
// imgs from http://wwwtxt.org/tagged/img
fs.readJson('./urls.json', (err, data) => {
if (err) return console.error(err)
data.forEach((url, index) => {
var re = /^http:\/\/[\d]{2}\.media\.tumblr\.com/
if (re.test(url)) {
@axelav
axelav / type.js
Created June 15, 2016 20:00 — forked from kirilloid/type.js
getType
function getType (value) {
let type = typeof value;
if (type === 'object') {
return value ? Object.prototype.toString.call(value).slice(8, -1) : 'null';
}
return type;
}
[NaN, 0, 1, Infinity, // numbers
null, undefined, false, 'str', // other primitives
@axelav
axelav / dscovr.js
Created November 10, 2015 13:52
dscovr
// JPG /epic-archive/jpg/epic_1b_20151104165333_00.jpg
// THUMB /epic-archive/thumbs/epic_1b_20151104165333_00.jpg
var http = require('http')
var fs = require('fs')
var jsdom = require('jsdom')
var jquery = fs.readFileSync("./node_modules/jquery/dist/jquery.min.js", "utf-8")
function download (url, dest, cb) {
var file = fs.createWriteStream(dest)
@axelav
axelav / url_regexp.js
Created September 11, 2015 20:38
url regexp
var urlRegExp = /^https?:\/\/[a-zA-Z0-9-\.]+\.[a-zA-Z]{2,4}\/?([^\s<>"\,\{\}\\|\^`]+)?$/
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body ng-app="APP">
<div ng-controller="ctrl">
<div scope-test