Skip to content

Instantly share code, notes, and snippets.

Steven Natera nodox

Block or report user

Report or block nodox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nodox
nodox / NERDTree.mkd
Created Jun 14, 2016 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet
View NERDTree.mkd

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|
@nodox
nodox / python-selenium-open-tab.md
Created Jul 5, 2016 — forked from lrhache/python-selenium-open-tab.md
Python Selenium - Open new tab / focus tab / close tab
View python-selenium-open-tab.md

On a recent project, I ran into an issue with Python Selenium webdriver. There's no easy way to open a new tab, grab whatever you need and return to original window opener.

Here's a couple people who ran into the same complication:

So, after many minutes (read about an hour) of searching, I decided to do find a quick solution to this problem.

View gist:18e468bcea3db99ec74fb1efc4f9ef87
var app = require('express').createServer()
var io = require('socket.io').listen(app);
app.listen(8080);
// routing
app.get('/', function (req, res) {
res.sendfile(__dirname + '/index.html');
});
View gist:a78d41e682e704f6bf8a0cd2b4ff0ede
<script src="/socket.io/socket.io.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script>
var socket = io.connect('http://localhost:8080');
// on connection to server, ask for user's name with an anonymous callback
socket.on('connect', function(){
// call the server-side function 'adduser' and send one parameter (value of prompt)
socket.emit('adduser', prompt("What's your name?"));
});
@nodox
nodox / digital_ocean_setup.md
Created Feb 13, 2017 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions
View digital_ocean_setup.md

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

Create a Droplet

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@nodox
nodox / mysql.database.yml
Created Feb 15, 2017 — forked from jwo/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
View mysql.database.yml
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
View ch_0.sh
# Start a new ubuntu box
$ vagrant init ubuntu/xenial64
$ vagrant up
# Login to ubuntu box
$ vagrant ssh
# install nvm
$ sudo apt-get update
@nodox
nodox / video.jsx
Created May 8, 2017 — forked from mikechau/video.jsx
videojs react component
View video.jsx
var React = require('react');
var cx = require('classnames');
var vjs = require('video.js');
var _forEach = require('lodash/collection/forEach');
var _debounce = require('lodash/function/debounce');
var _defaults = require('lodash/object/defaults');
var DEFAULT_HEIGHT = 800;
var DEFAULT_WIDTH = 600;
var DEFAULT_ASPECT_RATIO = (9 / 16);
View smartcar
swagger: '2.0'
info:
title: RVI HTTP API Spec
version: '0.0.5'
schemes:
- http
- https
consumes:
- application/json
produces:
@nodox
nodox / Dockerfile
Created Jul 16, 2017
Docker + Nvm + pm2
View Dockerfile
# Dockerfile
# using debian:jessie for it's smaller size over ubuntu
# FROM debian:jessie
FROM ubuntu:xenial
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Set environment variables
ENV appDir /var/www/app/current
You can’t perform that action at this time.