Skip to content

Instantly share code, notes, and snippets.

View iarp's full-sized avatar

Ian R-P iarp

  • Toronto, Ontario, Canada
View GitHub Profile
@joshatxantie
joshatxantie / gist:4bcf5d0243fba63845fce7cc40365a3a
Created September 2, 2021 04:18
Dockerize Pyodbc/SQL Server
# 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
@matusnovak
matusnovak / README.md
Last active March 31, 2024 21:27
GPG + Git SSH Authentication and Signing on Windows 10

GPG + Git SSH Authentication and Signing on Windows 10

Introduction

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.

Software needed

Technologies to learn to become a Back End Developer (Python/Django)

  • 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
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active April 30, 2024 13:22
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@wooddar
wooddar / multiprocess_selenium.py
Last active April 22, 2024 15:01
Easy Python script to run selenium web workers/browsers in parallel
"""
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
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# 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
@bitle
bitle / kill_defunct.sh
Created November 18, 2015 18:47
Kill defunct processes
# 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
@gabemarshall
gabemarshall / excel.py
Created March 5, 2014 17:31
Cracking a password protected excel doc with python
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]
@navap
navap / user_management.sh
Created November 18, 2013 18:59
Allows the user to add/edit/delete user accounts on the system
#!/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