Skip to content

Instantly share code, notes, and snippets.

@garg-aayush
garg-aayush / setup-personal-gpu-server.md
Created June 30, 2024 15:35
Step-by-Step Guide to setup your own personal GPU server

Setting Up Your Personal GPU Server: A Step-by-Step Guide

I've been using a GPU workstation with an RTX 4090 for almost a year now, and it's been one of the best decisions I've made. With a personal GPU server, you no longer need to rely on cloud-based GPU instances from services like RunPod or Vast.ai every time you want to run a job or try new models. The best part? No stress about recurring GPU instance costs! :-)

However, I rarely work directly on my workstation. Instead, I prefer the flexibility of accessing the GPU remotely using my MacBook, whether I'm working from different locations within my home, from a co-working space, or a cozy cafe in another part of town.

In this blog, I will walk you through the steps to configure a personal GPU Ubuntu server.

For this guide, I assume you already have a workstation running Ubuntu with a GPU and it is connected to your local network

@iarie
iarie / fix_stucked_shipments.rb
Last active June 10, 2020 10:21
all in one gist
interval = Date.new(2020, 5, 1)..Date.new(2020, 6, 7)
module FixStuckShipments
FINAL_STATES = %w[
shipped
canceled
].freeze
SHIPMENT_STATUS_MAP = {
'Complete' => 'shipped',
# Get Status
get_status = -> (po_number) do
r = Supplier::Alphabroder::OrderStatusV2::GetOrderStatus.new.call(po_number)
doc = Nokogiri::XML(r.body)
nodes = doc.xpath("//order[not(shipstatus)]")
pnode = Supplier::Alphabroder::OrderStatusV2::OrderXmlNode.new(nodes)
pnode.ship_method_nodes.map do |n|
{
number: n.shipper_number,
@iarie
iarie / find_stuck_processing_shipments.rb
Last active June 8, 2020 13:35
Find stuck shipments by criteria: shipment should have similar
# May
interval = Date.new(2020, 5, 1).all_month
stock_location_ids = Spree::Supplier.alphabroder.stock_location_ids
order_ids = Spree::Order.joins(:shipments).where(
completed_at: interval,
spree_shipments: {
state: 'processing',
stock_location_id: stock_location_ids
}
brand_and_catalog_numbers = {
'Bella + Canvas' => ['BST323', 'BST323C'],
'Bayside' => ['1900J1'],
'LAT' => ['J0041', 'J0042'],
'Rabbit Skins' => ['J0051', 'J0052'],
'US Blanks' => ['USFM47'],
'Next Level' => ['NLM100', 'NLM101']
}
brand_and_catalog_numbers.each do |brand_name, catalog_numbers|
shipping_rules = [
{
brand_name: 'Bella + Canvas',
free_shipping_threshold: 200,
shipping_fees: {
fastest: 9.95,
standard: 0.00,
economy: 5.45
},
discount_coupon_allowed: false,
@jkrems
jkrems / index.md
Last active September 13, 2024 06:14
JavaScript: Classic Scripts vs. Modules vs. CommonJS

JavaScript File Format Differences

There's the pervarsive notion that all JS is created equal and that there's only minor and easily detectable differences between the various file formats used to author JavaScript. This is correct, from a certain point of view.

A certain point of view?

For many people writing JavaScript that gets passed into build tools,

@praveendhawan
praveendhawan / Spree guides notes
Created March 27, 2018 08:00
SpreeGuides Notes
Spree Guides
Products
1. Track uniq products
2. Option Types -> denote the different options for a variant
3. Option Values -> values for option types
4. Product must be assigned at least one option type if you wish to create variants for that product
5. Variants -> individual variants of a Product
6. Master Variant -> tracks basic information such as a count on hand, a price and a SKU
@briankung
briankung / docker-pry-rails.md
Last active September 30, 2024 06:55
Using pry-rails with Docker
@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active October 28, 2024 15:27
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose