Skip to content

Instantly share code, notes, and snippets.

Joseph Lust twistedpair

Block or report user

Report or block twistedpair

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
@twistedpair
twistedpair / gogo_live_track.sh
Created Jan 2, 2018
Live Track Flight via Bash & GoGoWifi JSON API
View gogo_live_track.sh
!#/bin/bash
# Requires `watch` and `jq`
watch -d -n 1 -c -t \
"curl -s 'http://fig.gogoinflight.com/v1/flights?registration-number=N190UW&status=current&detail=true' | jq -C '.[].flight.gps'"
@twistedpair
twistedpair / add_intellij_launcher.sh
Last active May 15, 2018
Add desktop launcher for Intellij IDEA on Ubuntu KDE
View add_intellij_launcher.sh
# Add the following to /usr/share/applications/idea.desktop
# You can now search in launcher (e.g ALT+SPACE for IDEA or Intellij and launch)
# Note: I install IDEA releases in /opt/idea/ and symlink to the current version with head/, hence /opt/idea/head/
[Desktop Entry]
Version=2017.2
Name=Intellij Ultimate Edition
Comment=The Drive to Develop
GenericName=Intellij IDEA
# Update with your local install location
@twistedpair
twistedpair / validate_swagger_spec.sh
Created Jul 16, 2017
Swagger Spec Simple Validation Script
View validate_swagger_spec.sh
#!/bin/bash
set -e
FULL_SPEC_PATH="/path/to/spec.json" # Absolute, please
# Idempotent, local library install
virtualenv .
source bin/activate
pip install swagger-spec-validator
# Test the Spec
View mod_perf.scala
/**
Simple benchmark of different ways to do modulo
- Numbers collected on a 4Ghz i7-4790K, 8 core AMD, 32GB PC3 19200 ram, SSD
- Scala 2.11.8
- Java 1.8.0_91
# scalac mod_perf.scala && scala ModPerf
**/
object ModPerf extends App {
final val N = 1000000
@twistedpair
twistedpair / UnHashCash.class.php
Last active Feb 21, 2016
The fatuousness of various Wordpress plugins over the years has left me very underwhelmed. The following is a PoC showing just how easy it is to defeat the supposed "unhackable" and "unspammable" security provided by the [Wordpress HashCach Plugin](https://wordpress.org/plugins/hashcash/) , as discussed on my [blog post](https://lustforge.com/20…
View UnHashCash.class.php
<?php
/**
* @author Lustforge.com, 2010
* @version requires PHP 4.3 or higher
* @abstract Easily grab the Wordpress Hashcash hash for a given blog. Returns FALSE on failure.
* @example $HTML = file_get_contents('http://wordpress-plugins.feifei.us/hashcash/');
* $hash = UnHashCash::getHash($HTML);
* echo $hash;
*/
You can’t perform that action at this time.