Skip to content

Instantly share code, notes, and snippets.

View joshtwo's full-sized avatar

Joshua Blume joshtwo

  • Washington, D.C.
View GitHub Profile
@joshtwo
joshtwo / advanced-watch.sh
Created January 29, 2019 03:28
Reminder of how to do k00l stuff with `watch` in the shell.
#!/bin/bash
# If you want to do something fancy in a "watch" command, make a subshell
# remember that everything is getting passed to `sh -c`
sudo watch -d -- '(netstat -tpea --numeric-ports | grep tomcat9)'

Monday

Brazil

  • Military dictatorship closed off Brazil
  • Metal bands began recording in '85 just as the dictatorahip ended
  • Rock in Rio had 1.3m atendees
    • the presence of metal bands tame to the rest of the Western world overwhelmed Brazilians
    • "soundtrack of a new country", symbol of democracy
  • Sepultura, the first major Brazilian metal band, shocked people merely for coming from Brazil
    • Brazil "a place that seemed so different"
  • direct influence from outside metal bands; the story of seeing a band wear belts made out of bullets on an album cover and deciding to imitate it by gluing together batteries
module Main where
import System.IO
import Network
import Data.ByteString.Lazy.Char8 (ByteString)
import Data.Char (digitToInt, ord, isHexDigit)
import Data.Unique
import Control.Monad (forever, liftM)
import Control.Concurrent (forkIO)
import Control.Exception (finally)
<!DOCTYPE html>
<html>
<head>
<title>File Upload</title>
</head>
<style>
/* I have no creative ideas for how to style this */
body {
text-align: center;
}
@joshtwo
joshtwo / WSProxy.hs
Created May 10, 2015 04:13
The websocket proxy, mostly done
module Main where
import System.IO
import Network
import Data.ByteString.Lazy.Char8 (ByteString)
import Data.Char (digitToInt, ord, isHexDigit)
import Data.Unique
import Control.Monad (forever, liftM)
import Control.Concurrent (forkIO)
import Control.Exception (finally)
; find the maximum number in a list
;
; variables
; edi - Holds the index of the array
; ebx - Largest number
; eax - Current element
section .data
array:
@joshtwo
joshtwo / chat.php
Created July 14, 2014 14:56
Lets you send raw packets to dAmn one by one.
<?php
function connect_to_dA()
{
$s = fsockopen('tcp://199.15.160.100', 3900);
stream_set_blocking($s, 0);
return $s;
}
function input_loop($socket, $prompt='> ')
{
@joshtwo
joshtwo / max.asm
Created May 30, 2014 12:41
Finds the maximum element of the array using AT&T (as) syntax and Intel (nasm) syntax
; find the maximum number in a list
;
; variables
; edi - Holds the index of the array
; ebx - Largest number
; eax - Current element
section .data
array:
@joshtwo
joshtwo / lab1.py
Last active December 14, 2015 04:28
#!/usr/bin/python2
# Joshua Blume; INT 1111 LD04
# IMPORTANT NOTE FOR PROFESSOR THOMPSON:
#
# Python comes in two different major versions: Python 2 and Python 3.
# There are many notable differences between both distributions, which means
# that code written for one version may not work in another. There are two
# differences that I find important to point out with respect to the