Skip to content

Instantly share code, notes, and snippets.

View jakenotjacob's full-sized avatar
🐼

Jake Campbell jakenotjacob

🐼
View GitHub Profile
@jakenotjacob
jakenotjacob / http-https_rockstar_http2
Created September 8, 2017 12:18
FiveM HTTP/2 Investigation
`curl --http2 -svo /dev/null https://patches.rockstargames.com/prod/gtav/Launcher_EFIGS/GTA_V_Launcher_1_0_440_2.exe -w "\nContent Type: %{content_type} \
* Trying 208.111.158.187...
* TCP_NODELAY set
* Connected to patches.rockstargames.com (208.111.158.187) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
@jakenotjacob
jakenotjacob / howto.txt
Created January 3, 2016 21:19
How To Telnet
$ telnet irc.freenode.org 6667
... then magic happens...
Trying 185.30.166.38...
Connected to irc.freenode.org.
Escape character is '^]'.
:orwell.freenode.net NOTICE * :*** Looking up your hostname...
:orwell.freenode.net NOTICE * :*** Checking Ident
:orwell.freenode.net NOTICE * :*** No Ident response
@jakenotjacob
jakenotjacob / board_start.ex
Created December 19, 2015 07:53
Beginning code of Tetris in Elixir.
defmodule Tetris.Board do
def start_link do
Agent.start_link(fn ->
List.flatten(Enum.map(?a..?j, fn x ->
Enum.map(?0..?9, fn y ->
{String.to_atom(<< x, y >>), nil}
end)
end))
end, name: :board)
end
@jakenotjacob
jakenotjacob / tetris_board.ex
Created December 18, 2015 04:38
First attempt at... elixir.
board = List.flatten(Enum.map(?a..?j, fn x ->
Enum.map(0..9, fn y ->
{(String.to_atom(<< x :: utf8 >> <> "#{y}")), nil}
end)
end))
@jakenotjacob
jakenotjacob / todo.md
Last active September 18, 2018 01:00
Testing todo markdown

###TO DO

  • Do the thing
  • Zhu Li, did the thing
  • Did the thing?
  • Done?
  • heh?
 def is_this_the_krusty_crab?
@jakenotjacob
jakenotjacob / ohm.txt
Created December 2, 2015 21:54
Ohm's Law methods
ohm = volts/amps
ohm = (volts**volts)/watts
ohm = watts/amps**amps
amps = volts/ohms
amps = watts/volts
amps = sqrt(watts/ohms)
watts = volts*amps
watts = (volts**volts)/ohms
@jakenotjacob
jakenotjacob / Rakefile
Created November 20, 2015 16:12
Rakefile for IRC bot to create/reset database...
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
namespace :db do
require 'sequel'
DB = Sequel.sqlite("db/bot.db")
def seven_ate9(str)
num = str.split("")
x = 7
y = 9
num.each do |n|
if n = y
if y.between?(x)
num.delete(y)
end
end
@jakenotjacob
jakenotjacob / rnp.rb
Last active August 29, 2015 14:23
Beginning of RPN calc.
#!/usr/bin/env ruby
OPERATORS = {
"x": :*,
"/": :fdiv,
"+": :+,
"-": :-
}
def is_value?(token)
@jakenotjacob
jakenotjacob / config-inventory.yaml
Last active August 29, 2015 14:22
Inventory and Cart
:GR1:
:name: Green Tea
:price: 3.11
:SR1:
:name: Strawberries
:price: 5.00
:CF1:
:name: Coffee
:price: 11.23