This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /test.php HTTP/1.1 | |
Host: 127.0.0.1 | |
Connection: keep-alive | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36 | |
Accept-Encoding: gzip,deflate,sdch | |
Accept-Language: en-US,en;q=0.8 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2006 Allan Saddi <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# 2. Redistributions in binary form must reproduce the above copyright | |
# notice, this list of conditions and the following disclaimer in the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computer | |
******** | |
Summary | |
------- | |
-Computer- | |
Processor : 8x Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz | |
Memory : 16394MB (1352MB used) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name of display: :0 | |
display: :0 screen: 0 | |
direct rendering: Yes | |
server glx vendor string: NVIDIA Corporation | |
server glx version string: 1.4 | |
server glx extensions: | |
GLX_ARB_create_context, GLX_ARB_create_context_profile, | |
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, | |
GLX_ARB_multisample, GLX_EXT_buffer_age, | |
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from threadimg import * | |
class worker(Thread): | |
def __init__(self, filehandle, password, crackflag): | |
Thread.__init__(self) | |
self.fh = filehandle | |
self.pwd = password | |
self.cracked = crackflag | |
self.start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyglet | |
from pyglet.gl import * | |
from collections import OrderedDict | |
from time import time | |
from os.path import abspath | |
class House(pyglet.sprite.Sprite): | |
def __init__(self): | |
self.texture = pyglet.image.load(abspath('./image.png')) | |
super(House, self).__init__(self.texture) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from socket import gethostbyname | |
from time import * | |
domains = ('cobra.com', 'tiger.com', 'ferrarri.com', 'amazon.com', 'thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com', 'sockervadd.se') | |
for domain in domains: | |
start = time() | |
## This instructs the OS to do a DNS lookup. | |
gethostbyname(domain) | |
end = time() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Part of my main class more often than not, | |
# this will do the actual drawing of lines | |
def draw_line(xy, dxy, color=(0.2, 0.2, 0.2, 1)): | |
glColor4f(color[0], color[1], color[2], color[3]) | |
glBegin(GL_LINES) | |
glVertex2f(xy[0], xy[1]) | |
glVertex2f(dxy[0], dxy[1]) | |
glEnd() | |
# How to call it to get a two-line-thickness healthbar. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
gameVars = {'health' : 100, 'stamina' : 100} # 100% on both | |
print('Current health is:', gameVars['health']) | |
gameVars['health'] -= 25 | |
pickle.dump(gameVars, open('game.dump', 'wb')) | |
del(gameVars) | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
class Game(object): | |
def __init__(self): | |
self.experience = 0 | |
self.health = 0 | |
self.loadedFromDisk = False | |
def give_xp(self, given_xp): | |
self.experience += given_xp | |
def save_variables(self): | |
with open('game.dump', 'wb') as fh: |
OlderNewer