This file contains 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 © 2020 Sébastien Piquemal [email protected] | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See the license text below for more details. | |
# | |
# -------------------------------------------------------------------- | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# |
This file contains 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 time | |
import sys | |
total = int(sys.argv[1]) if len(sys.argv) > 1 else 100 | |
def status_line(num, total): | |
line = "> processed %d of %d files" % (num, total) | |
sys.stdout.write(line) | |
sys.stdout.flush() | |
sys.stdout.write("\b" * (len(line))) |
This file contains 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/env python | |
""" | |
Simple Indexer | |
================================= | |
Author: Jon Hurlock, October 2011 | |
This script basically crawls a domain (not just a page) and | |
then extracts all links <a href=""></a>, and finds all links | |
on that domain it also is able extract different file types |
This file contains 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/env python | |
from pygame import camera | |
import pygame | |
import time | |
import cv | |
import os | |
# Recognition |
This file contains 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
with curses_screen() as stdscr: | |
""" | |
Execution of the curses begins here. | |
""" | |
# Retrieve the size of the terminal currently open. | |
SCREEN_HEIGHT, SCREEN_WIDTH = stdscr.getmaxyx() | |
# Create the pad | |
mypad = curses.newpad(SCREEN_HEIGHT, SCREEN_WIDTH) | |
# Refresh the pad |
This file contains 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 curses | |
SCREEN_WIDTH, SCREEN_HEIGHT = 100, 100 | |
class curses_screen: | |
def __enter__(self): | |
"""Initialize""" | |
self.stdscr = curses.initscr() | |
curses.cbreak() | |
curses.noecho() |
This file contains 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
## {{{ http://code.activestate.com/recipes/491264/ (r4) | |
import socket | |
class DNSQuery: | |
def __init__(self, data): | |
self.data=data | |
self.dominio='' | |
tipo = (ord(data[2]) >> 3) & 15 # Opcode bits | |
if tipo == 0: # Standard query |
This file contains 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
(define (>> n i) (bitwise-arithmetic-shift n (- i))) | |
(define << bitwise-arithmetic-shift-left) | |
(define & bitwise-and) | |
(define (split n p) | |
(let* ((bc (bitwise-length n)) | |
(mid (div bc 2))) | |
(define (get-bit-seq s c) | |
(let ((rs (- bc s c)) | |
(m (- (<< 1 c) 1))) |
This file contains 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/env python3 | |
# | |
# http://www.pangloss.com/seidel/shake_rule.html | |
# Shakespeare Insult Kit | |
# | |
# Combine one word from each of the three columns below, prefaced with "Thou": | |
# | |
import random | |
Column_1 ="""artless bawdy beslubbering bootless churlish cockered |
This file contains 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
#restore .sql file to the database | |
mysql target-db-name < sql-file-name.sql -uuser -p | |
# [mysql dir]/bin/mysql -h hostname -u root -p | |
Create a database on the sql server. | |
mysql> create database [databasename]; | |
List all databases on the sql server. | |
mysql> show databases; |
NewerOlder