Skip to content

Instantly share code, notes, and snippets.

🏡
Working from localhost

Stefan Pejcic stefanpejcic

🏡
Working from localhost
Block or report user

Report or block stefanpejcic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View check-websites.py
from bs4 import BeautifulSoup,SoupStrainer
import urllib.request
import colorama,re,queue,threading
from colorama import Fore
from urllib.parse import *
class check_link():
def __init__(self,address):
self.address=address
def check(self,address):
View whois-servers-list.txt
MITSUBISHI:whois.nic.gmo
XN--3BST00M:whois.gtld.knet.cn
PW:whois.nic.pw
MUSEUM:whois.nic.museum
AMERICANFAMILY:whois.nic.americanfamily
RMIT:whois.nic.rmit
MOTORCYCLES:whois.afilias-srs.net
PROPERTIES:whois.nic.properties
STUDY:whois.nic.study
LY:whois.nic.ly
View list-of-tld-domains.txt
AAA
AARP
ABARTH
ABB
ABBOTT
ABBVIE
ABC
ABLE
ABOGADO
ABUDHABI
@stefanpejcic
stefanpejcic / reset-wordpress-password.sql
Created Nov 12, 2019
reset WordPress password from the database
View reset-wordpress-password.sql
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`)
VALUES ('INSERT_USERNAME_HERE', MD5('INSERT_PASSWORD_HERE'), 'INSERT_FIRSTNAME_LASTNAME>', 'INSERT_EMAIL_HERE', '0');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');
@stefanpejcic
stefanpejcic / calculator.py
Created Sep 25, 2019
Simple calculator with the operator instead of if
View calculator.py
import operator
ops = {
"+": operator.add,
"-": operator.sub,
"/": operator.truediv,
"*": operator.mul,
"**": pow
}
print(ops['-'](50, 25))
View string-functions.php
<?php
$statement1="the tree";
$statement2=" is growing";
$combination=$statement1;
$combination .=$statement2;
echo ucfirst ($combination);
echo ucwords ($combination);
echo strtolower ($combination);
echo strtoupper ($combination);
@stefanpejcic
stefanpejcic / clear-screen.py
Created Sep 21, 2019
Clear the screan in python
View clear-screen.py
import os
clear = lambda: os.system('cls')
clear()
@stefanpejcic
stefanpejcic / .htaccess
Created Sep 2, 2019
Disable 404 errors
View .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(robots\.txt|sitemap\.xml(\.gz)?)
RewriteCond %{REQUEST_FILENAME} \.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
RewriteRule .* - [L]
View functions.php
<?php wporb_set_post_view(); ?>
You can’t perform that action at this time.