Skip to content

Instantly share code, notes, and snippets.

View anthony-wang's full-sized avatar
💭
👨‍🔬🖥

Anthony Wang anthony-wang

💭
👨‍🔬🖥
View GitHub Profile
@tsrivishnu
tsrivishnu / docker-increase-inotify-max-user-watches.md
Last active April 8, 2024 12:15
Increase inotify watchers in Docker images during build

Increasing fs.inotify.max_user_watches for Docker images

TL;DR You can't set those for an image during build time becasue Docker takes the sysctl configuration from the Host. So, set the config on your host machine.

As in this link, to increase the maximum watchers, we need set fs.inotify.max_user_watches to a higher number in /etc/sysctl.conf.

@zottelbeyer
zottelbeyer / setup.sh
Last active April 3, 2024 20:08
ipv6 on docker-pihole
# enable ipv6 in dockerd conf:
# cat /etc/docker/daemon.json
{
"ipv6": true,
"fixed-cidr-v6": "2003::/64" # your ipv6. not sure if this is even necessary
}
# reload daemon conf:
sudo systemctl reload docker.service
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@jiewpeng
jiewpeng / add_anaconda_right_click_menu.md
Last active February 14, 2024 10:15
Add Anaconda Prompt to Windows right click context menu

This gist describes how to add Anaconda Prompt to the Windows right click context menu. This is because at some point, Anaconda no longer adds itself to the PATH after installation.

  1. Run regedit.exe
  2. Navigate to HKEY_CLASSES_ROOT > Directory > Background > shell
  3. Add a key named AnacondaPrompt and set its value to "Anaconda Prompt Here" (or anything you'd like it to appear as in the right click context menu)
  4. Add a key under this key, called command, and set its value to cmd.exe /K C:\Anaconda3\Scripts\activate.bat (may have to change the activate.bat file to whereever Anaconda is installed)
@mwaskom
mwaskom / titanic_seaborn.ipynb
Last active February 8, 2024 13:25
Exploring the Kaggle Titanic dataset with seaborn.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roydq
roydq / ubuntu_unattended_upgrades_gmail.markdown
Last active February 2, 2024 17:01 — forked from dwilkie/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

@stared
stared / software_for_scientists.md
Last active December 5, 2023 17:16
Software for scientists: community-edited list of general-purpose software for scientists.

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

@vinayak-mehta
vinayak-mehta / disease_outbreaks_camelot.ipynb
Last active November 5, 2023 18:54
A jupyter notebook showing how Camelot can be used to extract tables from PDFs scraped from the IDSP website.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Overbryd
Overbryd / unbound.conf
Created March 29, 2019 14:54
A pretty good unbound.conf, DNSSEC, caching and local forwarding
remote-control:
control-enable: yes
server:
do-ip6: no
do-ip4: yes
do-udp: yes
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
num-threads: 4
# Enable logs
verbosity: 1
@deergod1
deergod1 / pfSense config.md
Last active April 5, 2023 10:39
pfSense Easy Configuration Guide for HP t620 Plus

pfSense Simple Home Configuration - 2.4.3 / 2.4.4

Starting from Scratch

This is my personal guide for installing pfSense. Hope you find it useful. I made these notes to capture the details of my "install from scratch" to ensure I didn't miss important details. Also, I'm trying build my network with discrete "disposable" components that make the system mutable and less rigid. It does not cover installing any packages like Squid or Suricata as that's way beyond the scope of a basic, functional install.

I migrated from an environment that was at various times running Tomato Toastman 1.28 or Asuswrt-Merlin on Netgear and ASUS routers across four "access points" (one always acting as the firewall/gateway, the rest as APs). It was OK pre-gigabit, but had roaming problems, and I was using large Wifi routers with most of the features disabled. Also, I found that I could easily swamp the network and tank VOIP and Wifi Calling without even trying. The only fix was to throttle everything by using Bandwidth Limit