Skip to content

Instantly share code, notes, and snippets.

@haccks
haccks / mongo-setup-macos.md
Last active February 10, 2024 20:47
MongoDB Installation and Usage On MacOS
  1. Install mongodb community edition
  2. Install and configure mongosh
  3. Create a configuration file /etc/mongod.conf (you may need to create it with sudo). Copy the following snippet and replace <username> with your username and paste it:
processManagement:
   fork: true
net:
   bindIp: localhost
   port: 27017
storage:
@haccks
haccks / demo-subclass-cancel.py
Created September 29, 2023 19:36
QThread Demo
import sys
import time
from PySide6.QtWidgets import (QApplication, QMainWindow, QWidget,
QPushButton, QVBoxLayout, QProgressBar,
QHBoxLayout, QFrame)
from PySide6.QtCore import QThread, Signal, Slot, QMutex
class WorkerThread(QThread):
progress = Signal(int)
@haccks
haccks / postfix_mail_macosx.md
Last active March 29, 2024 23:27
Send mail from local host using postfix on MacOS High Sierra.

Setting up postfix on MacOS High Sierra

MacOS Sierra High comes with preinstalled postfix. Follow these steps to configure it on a local system:

1. Create a sasl_passwd file

sudo nano /etc/postfix/sasl_passwd
  • Add this to the file
@haccks
haccks / python_mail_sender.md
Last active December 23, 2023 13:05
Send emails to multi recipients with multiple attachments using python

A simple script in python3.x to

  • Send text emails.
  • Send to multiple clients.
  • Send multiple attachments (including images, videos, audios and compressed files)

To send email from the local SMTP server (localhost) it is assumed that a mail transfer agent (MTA), like postfix, is already configured on your local system. If not the follow this gist for step by step setup.

To send email from the gmail server you need to allow access for less secure apps in your Google account

@haccks
haccks / PassiveWiFiTracking.md
Last active December 27, 2023 11:45 — forked from numberwhun/Passive WiFi Tracking
Passive WiFi Tracking

Passive WiFi Tracking Posted February 26, 2014 by Edward Borrowed from: http://edwardkeeble.com/2014/02/passive-wifi-tracking/

In the last year or so, there have been quite a few stories on the use of passive WiFi tracking by advertisers, retailers, and analytics startups. Most of these articles focus on the significant privacy and security concerns associated with this practice, but few of them get into the details of how the technology works. Having built a similar system for my project, Casual Encounters, I think I can explain some of the inner workings of these systems, how to avoid being tracked, and how, for research purposes or to determine their own level of exposure, someone could build such a system. I will state that I am by no means an expert on wireless networks, signal analysis, or anything of the sort, but I have conducted a fair bit of research and trial and error, and it works for me. Your mileage may vary; don’t try this at home; etc, etc.

Probe Requests

When a WiFi client (phone,