Skip to content

Instantly share code, notes, and snippets.

View DeviaVir's full-sized avatar
🏴‍☠️

Chase DeviaVir

🏴‍☠️
View GitHub Profile

nginx.conf:

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {

Let me tell you a story. The day after Columbine, I was interviewed for the Tom Brokaw news program. The reporter had been assigned a theory and was seeking sound bites to support it. "Wouldn't you say," she asked, "that killings like this are influenced by violent movies?" No, I said, I wouldn't say that. "But what about 'Basketball Diaries'?" she asked. "Doesn't that have a scene of a boy walking into a school with a machine gun?" The obscure 1995 Leonardo Di Caprio movie did indeed have a brief fantasy scene of that nature, I said, but the movie failed at the box office (it grossed only $2.5 million), and it's unlikely the Columbine killers saw it.

The reporter looked disappointed, so I offered her my theory. "Events like this," I said, "if they are influenced by anything, are influenced by news programs like your own. When an unbalanced kid walks into a school and starts shooting, it becomes a major media event. Cable news drops ordinary programming and goes around the clock with it. The story is ass

@DeviaVir
DeviaVir / ticketswap-scrape.py
Created August 30, 2017 09:29
ticketswap scraper, you simply run this by `python ticketswap-scrape.py` and wait for it to start beeping so you can order a ticket.
#!/usr/bin/python
import urllib
import time
import re
import os
# change this link to some other event or day
link = 'https://www.ticketswap.com/event/into-the-woods-festival-2017/friday/7bd7177f-5ca6-43bb-91e7-7bc2d467a5ab/71046'
beep = lambda x: os.system("echo -n '\a';sleep 0.2;" * x)
@DeviaVir
DeviaVir / heroku.bash
Created July 13, 2017 09:41
List all of your apps and their respective node versions so you can check which of your apps are vulnerable to the reported Denial of Service https://groups.google.com/forum/#!topic/nodejs-sec/FG8glRVxS7Q
# assumed you already are authorized with `heroku login`
# assumed zsh env or bash file
for site (`heroku list`); do echo `heroku run node -v -a $site`; done;
@DeviaVir
DeviaVir / docker-compose.yml
Created June 15, 2017 17:09
Gekko multiple instances
server:
restart: always
build: ./
volumes:
- ./volumes/gekko/history:/usr/src/app/history
- ./config.js:/usr/src/app/config.js
links:
- redis
environment:
- HOST
building talib functions...
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.1.1 | linux | x64
gyp http GET https://nodejs.org/download//v8.1.1/node-v8.1.1-headers.tar.gz
gyp http 404 https://nodejs.org/download//v8.1.1/node-v8.1.1-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 response downloading https://nodejs.org/download//v8.1.1/node-v8.1.1-headers.tar.gz
import pandas as pd
ecom = pd.read_csv('Ecommerce Purchases')
ecom['Email'].apply(lambda x: x.split('@')[1]).value_counts().head(5)

Keybase proof

I hereby claim:

  • I am deviavir on github.
  • I am deviavir (https://keybase.io/deviavir) on keybase.
  • I have a public key ASDvlAMpdlyz5ryd1JdF_PElu0boyxwFsesfdOTmxEcjxQo

To claim this, I am signing this object:

@DeviaVir
DeviaVir / Makefile
Created April 21, 2017 23:50
Terraform
SHELL=/bin/bash
REGION?="us-west-2"
prepare:
$(eval AWS=$(shell echo pass hashbang/aws/terraform))
$(eval AAK=$(shell $(AWS) | sed -n 1p))
$(eval ASK=$(shell $(AWS) | sed -n 2p))
get:
terraform get