Skip to content

Instantly share code, notes, and snippets.

@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 8, 2024 07:20 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/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
@figassis
figassis / randomusphones.json
Created December 2, 2018 13:58
1000 valid us phone numbers for testing
["+1-418-543-8090","+1-587-530-2271","+1-404-724-1937","+1-443-307-1473","+1-329-420-1792","+1-770-212-6011","+1-473-522-7496","+1-477-962-3907","+1-478-797-3175","+1-948-914-6246","+1-268-763-5180","+1-369-441-8619","+1-501-926-2756","+1-223-919-0967","+1-328-857-2537","+1-636-613-5429","+1-547-538-9848","+1-523-317-7761","+1-557-680-6290","+1-905-546-5021","+1-975-999-8212","+1-358-342-3321","+1-669-937-7112","+1-506-676-9834","+1-510-518-1673","+1-282-995-0297","+1-667-407-8456","+1-396-518-2124","+1-528-705-6591","+1-395-288-8024","+1-390-949-5954","+1-437-295-3568","+1-227-799-6356","+1-703-363-8155","+1-618-720-3464","+1-557-394-8274","+1-237-257-1580","+1-623-416-0089","+1-533-762-6549","+1-299-471-0213","+1-790-548-2248","+1-469-253-5139","+1-580-303-6087","+1-507-639-8400","+1-269-771-0214","+1-645-818-7021","+1-436-974-4859","+1-952-660-7350","+1-493-885-4329","+1-697-392-0705","+1-744-865-4521","+1-887-526-1105","+1-816-630-9743","+1-496-717-7301","+1-212-475-2813","+1-222-993-6707","+1-868-574-867
@billti
billti / arm64-on-Win10.md
Last active May 8, 2024 07:19
ARM64 Linux on Win10

Below are the steps to get an ARM64 version of Ubuntu running in the QEMU emulator on Windows 10.

Install QEMU

Install for Windows from https://qemu.weilnetz.de/w64/ (I used qemu-w64-setup-20181211.exe)

Put C:\Program Files\qemu on your PATH, and run the below to check it's working (which will list out the CPUs the AArch64 emulator can emulate):

qemu-system-aarch64 -M virt -cpu help
Pipeline still running ...
PipelineRun is still running: Tasks Completed: 37 (Failed: 1, Cancelled 0), Incomplete: 3, Skipped: 11
[get-pr-number : parse-pr-url] + echo -n 335
[get-pr-number : parse-pr-url] + tee /tekton/results/git_pr_number
[get-pr-number : parse-pr-url] 335
[acquire-lease : create-lease] + calculate_duration_in_seconds 90m
[acquire-lease : create-lease] + '[' m == m ']'
[acquire-lease : create-lease] + TOTAL_DURATION_IN_SECONDS=5400
[acquire-lease : create-lease] + export TOTAL_DURATION_IN_SECONDS
@xrman
xrman / gist:4468f545b169969466bceb694d742dad
Created March 12, 2019 21:47
FastStone Capture Full Serial Key
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ
@vkz
vkz / hoot.md
Last active May 8, 2024 07:15
Tailscale your AWS and on-prem resources: have your cake and eat it too

Tailscaling git.ht

This [hoot][] you're about to read started its life as a gist of technical minutae I had to discover to Tailscale cloud and on-prem resources. It'd be too boring for me to just publish it, so I thought I'd give a little bit of context as a preamble. I get to rant some and you can simply skip to the technical sections below if you'd rather not indulge me.

Ranty preamble

How much of what AWS gives you do you really truly need? It's become Kubernetes this, Docker that. I rarely question it when contracting because contractors usually arrive after the fact to pick up and carry the pieces. You get to target the infrastructure that may as well have been installed by alients before humankind ascended in Amazon. All in the cloud, can't touch, jumpbox this, terraform that, re-create the world every time you sneeze, etc. It's different when you're hired fo

@stevenhaddox
stevenhaddox / server_certificates_to_pem.md
Last active May 8, 2024 07:13
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hostname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hostname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample

Link full khóa training device driver của embedded Linux ở đây nhé các bạn. Đây là video mình record trong khóa trước, do bị mắc 1 số lỗi về quay phát nên mình sẽ record lại trong khóa hiện tại mình đang dạy.
Bài 1: Kernel module - simple character device.
https://bit.ly/2AzsxrB
Bài 2: Giới thiệu về cơ chế timer trong hệ điều hành.
https://bit.ly/2O2rDpy
Bài 3: Hướng dẫn lập trình điều khiển interrupt trong Linux
kernel. https://bit.ly/2vtenmk
Bài 4: Giới thiệu về cơ chế system call trên Linux.
https://bit.ly/2KkXm32
Bài 5: Giới thiệu về kỹ thuật IPC - Inter Process Communication.
@dersam
dersam / gitkraken.zsh
Last active May 8, 2024 07:12
Open GitKraken using the current repo directory in the cli.
## Open GitKraken using the current repo directory.
## For when you want a prettier view of your current repo,
## but prefer staying in the cli for most things.
## This will break if GitKraken ever removes the -p flag.
## If you're not using OSX, the path is definitely different.
kraken () {
~/Applications/GitKraken.app/Contents/MacOS/GitKraken -p $(pwd)
}