This file contains hidden or 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
from django.core.cache import cache | |
from django.urls import reverse | |
from django.http import HttpRequest | |
from django.utils.cache import get_cache_key | |
def expire_page_cache(view, args=None): | |
""" | |
Removes cache created by cache_page functionality. | |
Parameters are used as they are in reverse() | |
""" |
This file contains hidden or 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 csv | |
import math | |
import requests | |
from bs4 import BeautifulSoup | |
HEADERS = { | |
"accept": "*/*", | |
"user-agent": "Dalvik/2.1.0 (Linux; U; Android 9; Redmi 7 MIUI/V11.0.9.0.PFLRUXM)", |
This file contains hidden or 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
stages: | |
- codequality | |
- tests | |
- deploy | |
variables: | |
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" | |
cache: | |
key: ${CI_COMMIT_REF_SLUG} |
This file contains hidden or 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
class NextURLMixin: | |
""" Use next variable by GET method to set success url """ | |
def get_success_url(self): | |
next_url = self.request.GET.get('next') | |
if next_url: | |
return next_url | |
return reverse('home') |
This file contains hidden or 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 | |
default_interface_net=wlp3s0 | |
default_interface_vpn=tun0 | |
utun_interface=$(netstat -nr -f inet | grep ${default_interface_vpn} | awk '{print $NF}' | head -n1) | |
default_route=$(netstat -nr -f inet | grep ${default_interface_net} | grep UGH | head -n1 | awk '{print $2}') | |
sudo route del default | |
sudo route add default gw ${default_route} | |
sudo route add -net 10.0.0.0/8 ${utun_interface} |
This file contains hidden or 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
cd /tmp | |
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz | |
sudo apt update | |
sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev | |
tar -xf Python-3.7*.tar.xz | |
cd Python-3.7.4 | |
./configure --enable-loadable-sqlite-extensions # Avoid an error in sqlite | |
make | |
sudo make altinstall | |
sudo python3.7 -m pip install --upgrade pip |
This file contains hidden or 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
# Install gitlab-runner | |
# Linux x86-64 | |
sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64 | |
# Linux x86 | |
#sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386 | |
# Linux arm | |
#sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm |
This file contains hidden or 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
clear | |
echo "[INIT]" | |
cl_forcepreload "1" | |
m_rawinput "1" | |
// HUD and Graphics | |
fps_max "125" |
This file contains hidden or 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
{"curses PT-BR": ["acefalo", "arrombado", "asno", "babaca", "baitola", "biba", "bicha", "bixa", "bobo", "bosta", "buceta", "bundao", "burro", "cacete", "cadela", "cagar", "caralho", "corno", "cu", "desgracado", "egua", "fdp", "foda", "idiota", "inferno", "jegue", "louco", "macaco", "mamar", "marica", "merda", "mijao", "otario", "pariu", "pau", "peidar", "pica", "pinto", "piriguete", "piroca", "piru", "porra", "puta", "quinto", "rapariga", "retardado", "rola", "vagabundo", "viado", "xereca"], "curses EN": ["anal", "ass", "balls", "biatch", "bitch", "blowjob", "bollock", "boner", "boob", "bugger", "butt", "buttplug", "cock", "coon", "crap", "cunt", "damn", "dick", "dike", "dyke", "dong", "drug", "drunk", "excrement", "fag", "flange", "fuc", "fuck", "fucka", "fucked", "fucker", "hell", "homo", "jizz", "muff", "nigga", "nigger", "piss", "poop", "prick", "pube", "pussy", "queer", "scrotum", "shit", "slut", "spunk", "tit", "tosser", "turd", "twat", "vomit", "wank", "whore", "wtf", "wuss"]} |