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 mechanicalsoup | |
import json | |
URL = 'https://menu.gog.com/v1/store/configuration?locale=en-US¤cy=USD&country=' | |
country_codes = ['AR','AU','AT','BS','BE','BO','BR','CA','CL','CN','CO','CR','HR','CU','CZ','DK','DO','EC','EG','SV','FI','FR','DE','GR','GT','HN','HK','IN','IE','IL','IT','JM','JP','LU','MX','MA','NL','NZ','NI','NG','NO','PY','PE','PL','PT','PR','RU','SA','ZA','ES','SE','CH','TW','TR','UK','US','UY','VE','SD','II','AF','AL','DZ','AO','AG','AW','AZ','BH','BD','BB','BY','BZ','BM','BT','BW','VG','BN','BG','BF','MM','BI','CM','CV','KY','KM','CG','CY','YE','DJ','DM','GQ','EE','FJ','GA','GM','GH','GD','GN','GW','GY','HT','HU','IS','ID','IR','CI','JO','KE','KW','KP','KG','LA','LV','LB','LR','LI','LT','MG','MY','ML','MT','MR','MN','MC','MZ','NP','AN','NE','OM','PK','PA','PH','QA','RO','KN','LC','VC','WS','SN','SG','SB','SZ','SY','TH','TT','TN','UA','AE','VN','YU','ZW','ZR','ET','KV','AX','AS','AD','AI','AQ','AM','BJ','BA','BV','IO','KH','CF','TD','CX','CC','CD','CK','ER','FK','FO','GF','PF','TF', |
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
#!/bin/bash | |
# The script below adds the branch name automatically to | |
# every one of your commit messages. The regular expression | |
# below searches for JIRA issue key's. The issue key will | |
# be extracted out of your branch name | |
# | |
# A variant of grep support the -P flag for PCRE is required | |
# | |
REGEX_ISSUE_ID="((?!([A-Z0-9a-z]{1,10})-?$)[A-Z]{1}[A-Z0-9]+-\d+)" | |
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 bash | |
# Server Backup Script | |
# Backs up: | |
# MySQL databases | |
# Important files on file system | |
# Variables | |
TIMESTAMP=$(date +"%d-%m-%Y_%H-%M-%S") | |
BACKUP_DIR="/root/backups/full" |
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
It looks like Facebook automatically tries to fix email corrections upon logging in. | |
If you login with the wrong email but correct password, it will do a bruteforce/close match attempt with similar emails. | |
If successfully, you login to that account, even if the email you put in belongs to another user. | |
Seems to work for even really wack emails that are 4 characters different! | |
If both accounts have the same password, it logs in the email that matches. | |
Tested on custom domain, might be a lot less usable on public @gmail.com domain etc. | |
https://security.stackexchange.com/questions/214814/why-can-i-log-in-to-my-facebook-account-with-a-misspelled-email-password |
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
FastDL notes: | |
- Files can either be uncompressed raw or bzip2 compressed (bz2 extension). | |
- srcds will try to download compressed version first, then try to download uncompressed version (NEEDS TESTING) | |
- Extention whitelist is good idea (either per folder or global as you don't want junk files in fastdl) | |
- 150MB compression limit exists for files (CSGO quirk): | |
- http://csgo-servers.1073505.n5.nabble.com/Problem-with-bz2-map-big-size-gt-150-MB-td11402.html | |
- If uncompressed file size is >= 150 MB, then do not compress and put it uncompressed on FASTDL OR put it on community workshop. | |
- Otherwise, download completes but unzipping fails. |
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
# | |
# Problem, we have exception which returns some data (i.e. code) | |
# We would like to 'break' out of an exception in except block based on conditions | |
# Here are some approaches: | |
# | |
class CodeException(Exception): | |
def __init__(self, message, code): | |
super().__init__(message) | |
self.code = code |
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
Windows Registry Editor Version 5.00 | |
; Created by: Shawn Brink | |
; Created on: December 10th 2016 | |
; Tutorial: https://www.tenforums.com/tutorials/72024-open-command-window-here-add-windows-10-a.html | |
[HKEY_CLASSES_ROOT\Directory\shell\cmd2] | |
@="@shell32.dll,-8506" | |
"Extended"=- |
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
Closely resembles Notepad++ default keymap. | |
CUT - Ctrl+X | |
COPY - Ctrl+C | |
PASTE - Ctrl+V | |
SELECTALL - Ctrl+A | |
UNDO - Ctrl+Z | |
REDO - Ctrl+Y |
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
af_ZA | |
am_ET | |
ar_AR | |
as_IN | |
az_AZ | |
be_BY | |
bg_BG | |
bn_IN | |
br_FR | |
bs_BA |
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
REM IntelliJ Terminal Startup Script | |
SET /p TARGET=<.idea\JAVA_HOME.txt | |
IF /i "%TARGET%"=="java6" ( | |
SET JAVA_HOME=%JAVA_6_HOME% | |
) | |
IF /i "%TARGET%"=="java8" ( | |
SET JAVA_HOME=%JAVA_8_HOME% | |
) | |
cmd.exe /K "CLEAR && ECHO ^>^> IntelliJ Terminal Startup Script V1.00 && ECHO ^>^> Using JAVA_HOME: %JAVA_HOME%" |