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
user nginx; | |
worker_processes auto; | |
pid /var/run/nginx.pid; | |
worker_rlimit_nofile 1048576; | |
events { | |
worker_connections 1048576; | |
multi_accept on; | |
use epoll; | |
} |
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
apt update | |
apt upgrade | |
apt dist-upgrade | |
ubuntu-drivers autoinstall | |
apt install -y software-properties-common | |
add-apt-repository ppa:linrunner/tlp | |
add-apt-repository ppa:ubuntuhandbook1/apps | |
add-apt-repository ppa:mpstark/elementary-tweaks-daily | |
apt update | |
apt install -y ubuntu-restricted-extras libavcodec-extra libdvd-pkg vlc unace rar unrar p7zip-rar p7zip sharutils uudeview mpack arj cabextract lzip lunzip tlp tlp-rdw laptop-mode-tools elementary-tweaks |
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
-- MySQL dump 10.13 Distrib 5.6.35, for debian-linux-gnu (x86_64) | |
-- | |
-- Host: flytapv.com Database: db_fos | |
-- ------------------------------------------------------ | |
-- Server version 4.1.21-standard | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
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 /home/<user>/ | |
sudo apt-get install unzip | |
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
unzip sdk-tools-linux-4333796.zip -d Android | |
rm sdk-tools-linux-4333796.zip | |
sudo apt-get install -y lib32z1 openjdk-8-jdk | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
export PATH=$PATH:$JAVA_HOME/bin | |
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc | |
cd Android/tools/bin |
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
def ptype(regex): | |
"""Searches a given regex parameterized query into a dict | |
>>> @search('(?P<letter>[A-Z])?') | |
... def getletter(string): | |
... return string['letter'] | |
... | |
>>> getletter('ABC') | |
('A', 'BC') | |
>>> getletter('0BC') | |
(None, '0BC') |
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
def search(regex): | |
"""Searches a given regex parameterized query into a dict | |
>>> @search('(?P<letter>[A-Z])?') | |
... def getletter(string): | |
... return string['letter'] | |
... | |
>>> getletter('ABC') | |
('A', 'BC') | |
>>> getletter('0BC') |
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
TAP FLIGHTPLAN - IFR TAP201B CS-TON LPPT-KEWR | |
-------------------------------------------------------------------------------- | |
ALL WEIGHTS IN KILOGRAMS (KG) STD 11AUG/2225Z | |
-------------------------------------------------------------------------------- | |
OFP 1 - PREPARED 11AUG/2155Z BY PEDRO RODRIGUES | |
TP201/TAP201B CS-TON/B77LGE ROUTE: DEFRTE | |
DEP: LPPT/LIS 03 ELEV 374 FT COST INDEX: 13 TTL G/C DIST: 2937 NM | |
ARR: KEWR/EWR 04L ELEV 17 FT INIT ALT: FL380 TTL F/P DIST: 3107 NM |
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
/// | |
/// https://weblogs.asp.net/jongalloway/encrypting-passwords-in-a-net-app-config-file | |
/// | |
static byte[] entropy = System.Text.Encoding.Unicode.GetBytes("Salt Is Not A Password"); | |
public static string EncryptString(System.Security.SecureString input) | |
{ | |
byte[] encryptedData = System.Security.Cryptography.ProtectedData.Protect( | |
System.Text.Encoding.Unicode.GetBytes(ToInsecureString(input)), |
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 selenium import webdriver | |
from collections import deque | |
browser = webdriver.Chrome() | |
try: | |
browser.get('http://www.portugal-vacc.org/') | |
# just chrome devtools'd this | |
# TODO: make sure this doesn't break when theres no scheduled ATC | |
elem = browser.find_element_by_css_selector('\ |
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
`virtualenv --python=/usr/bin/python3 .` create virtualenv on the project folder, if not done already | |
`source bin/activate` initiate the virtualenv | |
`pip install -r requirements.txt` or `pip install -r dev-requirements.txt` install python modules | |
`sudo /etc/init.d/mongo start` start the mongo instance (only required on Linux Subsystem for Windows) | |
`source deactivate` exit the virtualenv |
NewerOlder