Skip to content

Instantly share code, notes, and snippets.

View eighteyes's full-sized avatar
💭
Building the Future With Friends

Sean Canton eighteyes

💭
Building the Future With Friends
  • Eight Eyes Creations
  • Earth (Sol)
  • 00:58 (UTC -07:00)
View GitHub Profile
7B76313B62617369633B7365616E2063616E746F6E3B313B65696768746579657340676D61696C2E636F6D3B203B303B307D
@eighteyes
eighteyes / gist:bb21efc70f98ba3b75947329bc9ba908
Last active August 12, 2022 06:14
Shell command concordance sorted by frequency one-liner
history | cut -c 8-90 | sort | uniq -c | sort
@eighteyes
eighteyes / gist:882bc423e1eb9490210547d9cf98f086
Created April 8, 2021 19:04
TiddlyWiki CSV Export to txt/md in Python/Pandas
import pandas as pd
df = pd.read_csv('./tiddlers.csv')
for i, t in df.iterrows():
first = t.title[0]
# no tw junk
if ( first == '.' or first == '/'):
continue
@eighteyes
eighteyes / fu.js
Created April 13, 2017 21:29
new es constructor gotcha
var es5 = function(){ return this; }
var es6 = () => { return this; }
var a = new es5();
// no error
var b = new es6();
// TypeError: es6 is not a constructor
// I enjoy the other way of declaring constructors that is less classy.
// procedural programming - synchronous
var foo = 'foo';
foo += 'bar';
// foo = 'foobar'
// object oriented programming - synchronous
var Bar = function(a){ return a }
var foo = new Bar({ id: 123 })
foo.id = 123;
[o__o]
<|°_°|>
0-[o^o]-0
|o|<=o-c
@eighteyes
eighteyes / gist:04c43b6e7c18d8591f2060d75f5aa68f
Created January 12, 2017 19:12
NodeJS : Spawn STDIN / STDOUT messaging to node process inside a Docker container
// This is the outside in approach, where the parent process is not within Docker, but the child lives in a docker image.
var externalNodeProcess = require('child_process').spawn('docker', [
'run',
'-a', 'stdin', '-a', 'stdout', '-a','stderr',
'-i',
'image/name:tag',
'node','index.js'
], {
stdio: ['pipe', 'pipe', 'pipe']
@eighteyes
eighteyes / .travis.yml
Created December 1, 2016 22:15
npm link for travis
language: node_js
node_js:
- "6.4"
sudo: required
before_script:
- mkdir ~/.npm-global
- npm config set prefix '~/.npm-global'
- echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
- source ~/.profile
- npm link
@eighteyes
eighteyes / gist:98f298763aef4fc76777bc00e1b83fe1
Created September 7, 2016 16:49
Quick new alias command for zsh
alias ala=__ala
# alias last as
function __ala(){
echo "alias $1='`fc -ln -1`'" >> ~/.zsh-aliases
}
if ( true ) pass;
else nopass;
.
\^/|
_/ \|_