Skip to content

Instantly share code, notes, and snippets.

View danialranjha's full-sized avatar

Danial Ranjha danialranjha

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1KQSNyBarB9X9t71mQNqg3QYfvA7ZjBni6 https://explorer.blockstack.org/address/1KQSNyBarB9X9t71mQNqg3QYfvA7ZjBni6
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:DescribeInstances",
"Resource": "*"
},
{
"Effect": "Allow",
@danialranjha
danialranjha / get.rb
Created October 31, 2013 19:27
Quickly hacked together to solve a puzzle
require 'net/http'
require 'uri'
require 'json'
url = URI.parse("http://www.letsrevolutionizetesting.com/challenge")
for i in 1..100
http = Net::HTTP.new(url.host, url.port)
req = Net::HTTP::Get.new(url.request_uri, {'Accept' => 'application/json'})
response = http.request(req)
puts "Response #{response.code} #{response.message}: #{response.body}"
@danialranjha
danialranjha / gray_hat_1-edit.py
Created May 19, 2012 13:31
Gray Hat Python - Chapter 1, Page 11 - edit
class barley_amount(Union):
pass
barley_amount._fields_ = [
("barley_long", c_long),
("barley_int", c_int),
@danialranjha
danialranjha / gray_hat_1.py
Created May 19, 2012 13:27
Gray Hat Python - Chapter 1, Page 11
from ctypes import *
class barley_amount(Union):
_fields_ = [
("barley_long", c_long),
("barley_int", c_int),