Skip to content

Instantly share code, notes, and snippets.

View andrewsosa's full-sized avatar

Andrew Sosa andrewsosa

View GitHub Profile
@andrewsosa
andrewsosa / server.log
Created September 8, 2017 04:27
Someone tried to break into my site
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:01:58 +0000] "HEAD / HTTP/1.0" 503 0 "-" "Mozilla/5.0 Jorgee"
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:14:56 +0000] "HEAD /mysql/admin/ HTTP/1.0" 503 0 "-" "Mozilla/5.0 Jorgee"
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:14:56 +0000] "HEAD /mysql/dbadmin/ HTTP/1.0" 503 0 "-" "Mozilla/5.0 Jorgee"
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:14:56 +0000] "HEAD /mysql/sqlmanager/ HTTP/1.0" 503 0 "-" "Mozilla/5.0 Jorgee"
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:14:56 +0000] "HEAD /mysql/mysqlmanager/ HTTP/1.0" 503 0 "-" "Mozilla/5.0 Jorgee"
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:14:56 +0000] "HEAD /phpmyadmin/ HTTP/1.0" 503 0 "-" "Mozilla/5.0 Jorgee"
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:14:56 +0000] "HEAD /phpMyadmin/ HTTP/1.0" 503 0 "-" "Mozilla/5.0 Jorgee"
nginx.1 | 162.243.44.174 172.17.0.1 - - [07/Sep/2017:23:14:57 +0000] "HEAD /phpMyAdmin/ HT
@andrewsosa
andrewsosa / .hyper.js
Created April 22, 2017 15:42
hyper.js config
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@andrewsosa
andrewsosa / .zshrc
Created April 22, 2017 15:40
zshell config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/andrew/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="materialshell-oceanic"
@andrewsosa
andrewsosa / mergesort.py
Last active March 6, 2017 17:23
Minimalistic Merge sort in Python
def select(left, right):
"""Choose the minimum front from left and right, but handle empty lists."""
return left.pop(0) if (len(left) > 0 and len(right) is 0) or (len(left) > 0 and left[0] < right[0]) else right.pop(0)
def merge(left, right):
"""Conquer: Merge together the selected (min) front of left and right."""
return [select(left,right) for i in range((len(left) + len(right)))]
def sort(l):
"""Divide: Recursive call to split input list into managable sublists."""