Skip to content

Instantly share code, notes, and snippets.

View johndpope's full-sized avatar

John D. Pope johndpope

View GitHub Profile
@khansun
khansun / LinuxCUDAtoolkits.md
Last active April 9, 2024 15:37
Multiple versions of CUDA toolkit and CUDNN installation guide for Linux and WSL2

Solve python environment related issues to utilize CUDA enabled GPUs

NVIDIA GPU Driver

  • Check status from terminal: nvidia-smi.

  • Skip this step if you have the following output:


+-----------------------------------------------------------------------------+
@JanX2
JanX2 / github_get_all_forks.sh
Last active December 12, 2023 14:04 — forked from joeytwiddle/github_get_all_forks.sh
Add all forks of the current repo as remotes
#!/usr/bin/env bash
set -e
# See also: https://github.com/frost-nzcr4/find_forks (same thing but in python)
origin_url="$(git config --get remote.origin.url | sed 's+.*: ++')"
full_repo_name="$(echo "$origin_url" | sed 's+.*github.com/++ ; s+\.git$++')"
forks_url="https://api.github.com/repos/${full_repo_name}/forks"
@stek29
stek29 / extract_telegram_macos.ipynb
Last active April 24, 2024 17:38
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aaabramov
aaabramov / install.sh
Last active January 13, 2024 01:26
Installing zsh + oh-my-zsh on Amazon EC2 Amazon Linux 2 AMI. (Prepared in the scope of posting https://aaabramov.medium.com/installing-zsh-oh-my-zsh-on-amazon-ec2-amazon-linux-2-ami-88b5fc83109)
sudo yum update
# Installing ZSH
sudo yum -y install zsh
# Check ZSH has been installed
zsh --version
# Install "util-linux-user" because "chsh" is not available by default
# See https://superuser.com/a/1389273/599050
@ride90
ride90 / killer.sh
Last active July 25, 2021 04:41
Process killer by name
#!/usr/bin/env bash
# Author: Oleh Pshenychnyi
# Date: 13.02.2021
#
# Kill all processes matching a provided pattern.
#
# Usage:
#
# >> bash killer.sh celery
@rin
rin / aws-lambda-youtube-dl.js
Created December 23, 2020 19:30
AWS Lambda to download youtube videos to S3
// To use this, put it in a folder, install ytdl-core with `npm i ytdl-core`, then create a ZIP with the content of the folder and deploy it.
// https://docs.aws.amazon.com/lambda/latest/dg/nodejs-package.html#nodejs-package-dependencies
var AWS = require('aws-sdk');
const ytdl = require('ytdl-core');
const stream = require('stream');
var s3 = new AWS.S3();
exports.handler = async (event, context, cb) => {
const { videoUrl, key, bucket } = event;
@citruz
citruz / QEMU_ON_M1.md
Last active May 4, 2024 07:50
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@peter-mcconnell
peter-mcconnell / Dockerfile
Last active December 19, 2020 09:19
docker ssh with github pubkey auth
FROM ubuntu:20.04
LABEL "MAINTAINER" "Peter McConnell <me@petermcconnell.com>"
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
xauth \
openssh-server \
@romdim
romdim / apfs-fuse-install.sh
Created September 26, 2020 08:44
Install apfs-fuse in Ubuntu 20.04 LTS
sudo apt update
sudo apt install fuse libfuse-dev libicu-dev bzip2 libbz2-dev cmake git libattr1-dev zlib1g-dev g++
sudo snap install cmake --classic
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
mkdir build
@zsyzzsoft
zsyzzsoft / data-efficient-gans.ipynb
Last active December 18, 2020 12:04
data-efficient-gans.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.