javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
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 | |
| # User Management script that allows the user to add/edit/delete | |
| # user accounts on the system. Must be run with root privileges. | |
| # Requires mkpasswd to be installed. | |
| # | |
| # Author: Pavan Chander | |
| # Revision: 0.7 | |
| # Last update: 2013-11-18 |
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 sys | |
| import win32com.client | |
| openedDoc = win32com.client.Dispatch("Excel.Application") | |
| filename= sys.argv[1] | |
| password_file = open ( 'wordlist.lst', 'r' ) | |
| passwords = password_file.readlines() | |
| password_file.close() | |
| passwords = [item.rstrip('\n') for item in passwords] |
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
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import datetime | |
| from mock import patch | |
| from django.test import TestCase | |
| from django.utils import timezone | |
| class DatesTestCase(TestCase): |
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
| # Find all parents and kill the whole process tree | |
| ps xao pgid,ppid,pid,comm | grep defunct | awk '{print -$2}' | sort -n | uniq -d | xargs sudo kill -9 |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
| """ | |
| This is an adaptable example script for using selenium across multiple webbrowsers simultaneously. This makes use of | |
| two queues - one to store idle webworkers and another to store data to pass to any idle webworkers in a selenium function | |
| """ | |
| from multiprocessing import Queue, cpu_count | |
| from threading import Thread | |
| from selenium import webdriver | |
| from time import sleep | |
| from numpy.random import randint |
- Linux - be proficient using Ubuntu for example and the CLI and understand how the shell works, what are environment variables, subshells, processes/tasks, etc...
- Docker (and docker-compose) - what are containers and how they work (conceptually) and how to create and run ones
- Git - what does version control system mean and how to use Git
- RDB (relational databases) - what are relational databases, and understand tables, how to create them and make relations between them as needed... also understand that through SQLite and PostgreSQL (preferred) or MySQL
- Python - how to write Python very well and understand its [OOP] implementation...
- Virtualenv - And how to create virtual environments for python to isolate it from the system's installed version...
- Virtualenvwrapper to manage virtual environments easily
This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.
No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.
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
| # syntax=docker/dockerfile:1 | |
| FROM python:3.8-slim-buster | |
| WORKDIR /app | |
| ENV ACCEPT_EULA=Y | |
| RUN apt-get update -y && apt-get update \ | |
| && apt-get install -y --no-install-recommends curl gcc g++ gnupg unixodbc-dev |
OlderNewer