Skip to content

Instantly share code, notes, and snippets.

View pr0way's full-sized avatar
🎯
Focusing

Tpk pr0way

🎯
Focusing
View GitHub Profile
@pr0way
pr0way / keybase.md
Created April 25, 2018 19:46
keybase.md

Keybase proof

I hereby claim:

  • I am r0v on github.
  • I am tpk (https://keybase.io/tpk) on keybase.
  • I have a public key ASC1wCUwPF3ltiwQSackxVHHGQAyvvLkqmcrz4G4kSywDgo

To claim this, I am signing this object:

@pr0way
pr0way / verifyDomain.sh
Created June 15, 2018 12:14
Nice code to check correct vhost domain from input field
defaultExt="local"
defaultName="example"
function vaildDomain(){
if [[ $1 =~ \. ]]; then
local domain=$(echo ${1%%.*} | tr '[:upper:]' '[:lower:]')
local tld=$(echo ${1##*.} | tr '[:upper:]' '[:lower:]')
@pr0way
pr0way / goMail.py
Created October 18, 2018 15:43
Gmail 2018 auto log-in with selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
myLog = "user@example.com"
myPass = "password"
browser = webdriver.Chrome('C:\\chromedriver')
browser.get("https://accounts.google.com/signin/v2/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin")
element = browser.find_element_by_name("identifier")
element.send_keys(myLog)
@pr0way
pr0way / index.html
Last active November 10, 2018 20:04
"Moving levels" - universal concept do anything on scroll (for example ~ start/stop YouTube player)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.box{
@pr0way
pr0way / docker.sh
Created November 18, 2018 19:30
Docker cheat
sudo docker container ls # show running container
sudo docker container ls -a # show all container
sudo docker container rm $(sudo docker container ls -aq) # remove all container
sudo docker images # show all images
sudo docker image rm $(sudo docker image ls -q) # remove all images
@pr0way
pr0way / nginx.file
Created November 23, 2018 17:41
Simple temporary solution for disappear nginx logs folder
# Add these lines at the end your /etc/rc.local before `exit 0`
if [ ! -d /var/log/nginx ]; then
sudo mkdir -p /var/log/nginx
fi
@pr0way
pr0way / randomize.py
Last active March 3, 2019 00:51
Simple script to shake your file context :)
#! /usr/bin/env python
import sys
from random import sample
class File:
# Open file
def __init__(self, name, mode='r+'):
self.name = name
@pr0way
pr0way / pagekit.local
Created May 14, 2019 14:51
Pagekit config file for nginx servers (working ~ PHP 7.2-FPM)
server {
# Server name
server_name pagekit.local www.pagekit.local;
error_log /var/log/nginx/pagekit.local.error error;
access_log /var/log/nginx/pagekit.local.access;
# Server Port
listen 80;
@pr0way
pr0way / Readme.md
Last active December 27, 2019 17:17
Simple removeDuplicate script

How to use?

Simple copy/paste code or download/extract and:

  1. Permit to execute chmod +x removeDumplicate.py

  2. Use: ./removeDuplicate.py <source-file> <target-file>

Parameters Required Description
`` Yes Your file which you want to modify
@pr0way
pr0way / README.md
Last active January 31, 2024 09:49
Simple init script to up & down wireguard
  1. Go to /etc/init.d directory
  2. Create file with name "wireguard" and content below.
  3. Make file executable chmod +x wireguard
  4. Add to rc-update: rc-update add wireguard default
  5. That's it