Skip to content

Instantly share code, notes, and snippets.

View stormpython's full-sized avatar

Shelby Sturgis stormpython

  • Netflix
  • San Francisco, CA
View GitHub Profile
@stormpython
stormpython / schema.sql
Created June 5, 2014 08:14
Example MySQL schema
-- Example table schema
-- To import your schemas into your database, run:
-- `mysql -u username -p database < schema.sql`
-- where username is your MySQL username
-- Load data into table
-- LOAD DATA LOCAL INFILE 'country.csv' INTO TABLE world_index
-- FIELDS TERMINATED BY ','
-- ENCLOSED BY ''
-- LINES TERMINATED BY '\n'
@stormpython
stormpython / brush.js
Last active August 29, 2015 14:01
Brush code for histogram
brush = d3.svg.brush()
.x(xScale)
.on('brushend', brushend);
if (dispatch.on('brush')) {
svg.append('g')
.attr('class', 'brush')
.call(brush)
.selectAll('rect')
.attr('height', height);
define(function(require) {
'use strict';
var _ = require('lib/lodash/dist/lodash');
/* Returns the indexed position of a value in an array. */
function isValInArr(val, arr) {
for (var i = 0; i < arr.length; i++) {
// if (!arr[i]) { arr.splice(i, 1); return 0; }
if (arr[i].x === val) { return i; }
@stormpython
stormpython / flaskapp
Created April 10, 2014 13:51
nginx conf file
server {
listen 80;
root /usr/ubuntu/insighfl;
index index.html index.htm;
server_name "";
location / {
proxy_pass http://127.0.0.1:5000;
$scope.data = {
"rows": [
{
"columns": [
{
"label": "200 requests",
"xAxisLabel": "Date",
"yAxisLabel": "Average Request Size in Bytes",
"layers": [
{
@stormpython
stormpython / timechart.js
Created April 2, 2014 14:53
Link Function
define(function (require) {
var _ = require('lodash');
var $ = require('jquery');
var k4 = require('K4D3');
var app = require('modules').get('app/discover');
app.directive('discoverTimechart', function ($compile) {
return {
restrict: 'E',
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
div.col {
display: inline-block;
}
</style>
</head>
@stormpython
stormpython / README.md
Last active August 29, 2015 13:57
Stacked-to-Grouped-to-Normalized Bars

Files and Directories in Linux

  • /bin - binaries/exectuables
  • /boot - boot parameters and kernel
  • /dev - devices
  • /etc - configuration files
  • /home - users' home directories
  • /lib - libraries and system modules
  • /media - removable drives are mounted here
  • /mnt - permanently attached devices are mounted here
@stormpython
stormpython / how_to_set_up_ssh_keys.md
Last active August 10, 2023 03:33
Setting up ssh keys for remote server access

How to Set up SSH Keys

Create the RSA Key Pair

ssh-keygen -t rsa

Store the Keys and Passphrase

Once you have entered the Gen Key command, you will get a few more questions: