Skip to content

Instantly share code, notes, and snippets.

@skseth
skseth / commands.md
Created April 2, 2023 10:31
macos - network commands

Find process listening on port

sudo lsof -i -P | grep LISTEN | grep :$PORT

How to package / distribute / install a wheel

Packaging

The following command builds a wheel for your project.

poetry build

Dependencies are listed in the METADATA file inside the wheel. You can see the dependencies by extracting this file, as the wheel file is just a zip. See the references below.

@skseth
skseth / vm-create.md
Last active January 31, 2023 12:12
Setting up a Debian Bullseye GPU Dev Machine

Create a machine

Choose

  • GPU (T4)
  • image (Debian 11 Bulleye w/ 50 GB boot disk size)
  • add an extra 100 GB disk - choose to delete when vm is deleted, and give it a custom device name to make it easier to see
  • add an ssh key if you want - give user name that you want to login as
  • make this a spot instance to save money

Now, ssh in

@skseth
skseth / mono-repo.sh
Last active January 27, 2023 10:29
Merging repos into a monorepo
# SRC_REPO, TGT_REPO are relative to current directory
SRC_REPO=$1
TGT_REPO=$2
DIR_NAME=$3
BRANCH_NAME=$4
pushd $SRC_REPO
git filter-repo --to-subdirectory "$DIR_NAME" # replace w/ your dir name
popd
# du -sh - disk usage in s - summary h - human readable format
# grep -E "\dG" - filter out items with a digit followed by G - gigabyte
du -sh * | grep -E "\dG"
@skseth
skseth / linux_setup.md
Last active January 7, 2020 05:11
Setting up my linux machine

Setup linux

Currently covering ubuntu 18.04 64 bit

Installing Editors

Visual Studio Code

sudo apt update sudo apt install software-properties-common apt-transport-https wget

package main
import (
"bufio"
"fmt"
"io"
"os"
"syscall"
)
@skseth
skseth / PropMain.java
Created March 9, 2019 08:43
Java CompositeConfiguration usage
package test;
import org.apache.commons.configuration.CompositeConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.BaseConfiguration;
import java.util.Iterator;
class PropMain {
@skseth
skseth / gist:477d46a0bf835692a35979ccaaa3a785
Created September 29, 2018 18:33 — forked from proger/gist:1877247
oneway git->svn sync
#!/bin/bash
SVN_HOST="https://svn/path/to/repo"
git checkout master
git pull --rebase
git config --local svn-remote.svn.url "${SVN_HOST}"
git config --local svn-remote.svn.fetch ":refs/remotes/git-svn"
git config --local svn.rmdir true
@skseth
skseth / fuzeinv
Created November 12, 2015 07:26
fuzemeeting note
This is a Fuze Meeting. For the optimal Fuze experience, we suggest you download Fuze ( https://www.fuze.com/download ) before your meeting.
Meeting ID: <ID>
Join Online Meeting: http://fuze.me/<ID>
Join by phone:
Dial phone number and enter the Meeting ID when prompted
- US Toll: +1 201-479-4595
- India Toll Free : 0008004420042