Skip to content

Instantly share code, notes, and snippets.

View Lh4cKg's full-sized avatar
🐍
Working

Lasha Gogua Lh4cKg

🐍
Working
View GitHub Profile
@Lh4cKg
Lh4cKg / Python Proxy Tester
Created October 10, 2015 07:56 — forked from eye9poob/Python Proxy Tester
Python Proxy Tester
import requests
nList= []
nProxL = ''
file = open('proxy.txt')
for line in file:
try:
aproxy = line.strip('\n')
user_agent = {'User-agent': 'Mozilla/5.0'}
print aproxy
proxies = {
#! /usr/bin/env python
import fileinput
import argparse
from operator import itemgetter
parser = argparse.ArgumentParser()
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int)
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+')
args = parser.parse_args()

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

#!/bin/bash
NAME="hello_app" # Name of the application
DJANGODIR=/webapps/hello_django/hello # Django project directory
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
USER=hello # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@Lh4cKg
Lh4cKg / infix.py
Created April 19, 2015 05:21
infix operator
# definition of an Infix operator class
# this recipe also works in jython
# calling sequence for the infix is either:
# x |op| y
# or:
# x <<op>> y
class Infix:
def __init__(self, function):
self.function = function
<?php
if(isset($_GET['lat'])) {
$lat = trim($_GET['lat']);
}
if(isset($_GET['lon'])) {
$lon = trim($_GET['lon']);
}
if(isset($_GET['acc'])) {
$acc = trim($_GET['acc']);
@Lh4cKg
Lh4cKg / gettome
Created September 26, 2014 19:31
<?php
if(isset($_GET['lat'])) {
$lat = trim($_GET['lat']);
}
if(isset($_GET['lon'])) {
$lon = trim($_GET['lon']);
}
if(isset($_GET['acc'])) {
$acc = trim($_GET['acc']);
#!/usr/bin/perl
#########################################
# Fierce v0.9.9 - Beta 03/24/2007
# By RSnake http://ha.ckers.org/fierce/
# Threading and additions by IceShaman
#########################################
use strict;
use Net::hostent;
@Lh4cKg
Lh4cKg / womlg.py
Last active November 7, 2017 14:24
python3 wordlist generator, womlg.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Created on 06 Nov 2013
@author: Lasha Gogua
"""