Skip to content

Instantly share code, notes, and snippets.

View dsully's full-sized avatar

Dan Sully dsully

View GitHub Profile
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active August 11, 2025 03:47
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/bin/bash
### steps ####
# Verify the system has a cuda-capable gpu
# Download and install the nvidia cuda toolkit and cudnn
# Setup environmental variables
# Verify the installation
###
### to verify your gpu is cuda enable check

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@royling
royling / tmux-iterm2.md
Last active April 24, 2023 19:35
tmux in iTerm2 cheatsheet
@dpino
dpino / ns-inet.sh
Last active May 13, 2025 10:00
Setup a network namespace with Internet access
#!/usr/bin/env bash
# set -x
if [[ $EUID -ne 0 ]]; then
echo "You must be root to run this script"
exit 1
fi
# Returns all available interfaces, except "lo" and "veth*".
@relevitt
relevitt / events.py
Last active November 22, 2016 05:01
SoCo Events module rewritten to use twisted
# -*- coding: utf-8 -*-
"""Classes to handle Sonos UPnP Events and Subscriptions."""
#from __future__ import unicode_literals
import logging
import socket
import time
firewall {
ipv6-name dmz-lan-6 {
default-action drop
enable-default-log
rule 100 {
action accept
log enable
protocol ipv6-icmp
}
rule 1 {
@jmcarp
jmcarp / marshmodel.py
Last active March 5, 2018 01:45
marshmallow-models
import six
import inflection
import marshmallow as ma
class Model(object):
def __init__(self, **kwargs):
self._schema = self.Schema()
self.load(**kwargs)
@corny
corny / unifi-backup.sh
Last active September 11, 2025 08:03
Improved backup script for Ubiquiti UniFi controller
#!/bin/bash -e
#
# Improved backup script for Ubiquiti UniFi controller
# original source: http://wiki.ubnt.com/UniFi#Automated_Backup
#
# must contain:
# username=<username>
# password=<password>
source ~/.unifi-backup
@kaka19ace
kaka19ace / curl_request.py
Last active June 6, 2020 18:37
using pycurl request (support multi request)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @file curl_request.py
# @author kaka_ace <[email protected]>
# @date Jan 10 2015
# @breif learn from human_curl
# @refrences:
# http://pycurl.sourceforge.net/doc/curlmultiobject.html
# http://curl.haxx.se/libcurl/c/curl_multi_info_read.html