Skip to content

Instantly share code, notes, and snippets.

@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 3, 2024 09:53
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@tzmartin
tzmartin / ios.settings.schemes.md
Created January 13, 2016 18:27
iOS Settings URL Scheme List

Settings URL schemes:

Note: < i=OS 5.1 use prefs:. > 5.1 use app-settings:

  • app-settings:root=General&path=About
  • app-settings:root=General&path=ACCESSIBILITY
  • app-settings:root=AIRPLANE_MODE
  • app-settings:root=General&path=AUTOLOCK
  • app-settings:root=General&path=USAGE/CELLULAR_USAGE
  • app-settings:root=Brightness
@cedrickchee
cedrickchee / rust_resources.md
Last active May 3, 2024 09:46
Awesome Rust — a collection of resources for learning Rust

Awesome Rust

I learn Rust by reading The Rust Programming Language (aka. TRPL) book.

This is my mind map and collection of resources for learning Rust in early 2019.

I plan to continuously update this list if time allows in future. I will move this into its own GitHub repo or something more permanent when this grow.


@cgiosy
cgiosy / sort_by_angle.cpp
Last active May 3, 2024 09:45
각도로 정렬하기
auto m=partition(A.begin(), A.end(), [&](pii p) { return p<pii{}; });
sort(A.begin(), m, [&](pii a, pii b) { return cross(a, b)<0; });
sort(m, A.end(), [&](pii a, pii b) { return cross(a, b)<0; });
@the-crypt-keeper
the-crypt-keeper / 3060vs3060.md
Created May 2, 2024 17:59
RTX 3060 x1 vs x16 results on 4-bit quantized Llama 8B Instruct models

Enviroment setup

Test Host is an HP z640 with Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz

Device 0 is a GeForce RTX 3060 Lite Hash Rate (EVGA) connected via the cheapest USB x1 crypto mining riser I could find online.

Device 1 is a GeForce RTX 3060 (HP OEM) connected via an x16 PCIe 4.0 riser cable (although note that my host does not support past PCIe past 3.0)

tensorrt-llm 0.8.0

@bskinn
bskinn / intersphinx_mappings.txt
Last active May 3, 2024 09:39
Various intersphinx mappings
# The entries in this file are checked regularly for validity via the Github Action
# sited at github.com/bskinn/intersphinx-gist.
# Please feel free to post an issue at that repo if any of these mappings don't work for you,
# or if you're having trouble constructing a mapping for a project not listed here.
Python 3 [latest]: ('https://docs.python.org/3/', None)
Python 3 [3.x]: ('https://docs.python.org/3.9/', None)
attrs [stable]: ('https://www.attrs.org/en/stable/', None)
Django [dev]: ('https://docs.djangoproject.com/en/dev/', 'https://docs.djangoproject.com/en/dev/_objects/')
Flask [2.2.x]: ('https://flask.palletsprojects.com/en/2.2.x/', None)
@charlesaloaye
charlesaloaye / gist:d5234275c8ed0bb4510ffaa9670d80aa
Last active May 3, 2024 09:39
2024 JETBRAINS ACTIVATION CODE | PHPSTORM | PYCHARM | Expires October 14, 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
@mcrumm
mcrumm / phx_sqlite_fly_launch.md
Last active May 3, 2024 09:38
Phoenix + SQLite Deployment tips

Deploying to Fly.io with SQLite

Deploying a Phoenix app to Fly.io is a breeze...is what everyone kept telling me. In fairness, I imagine the process would have been breezier had I just used postgres, but all the sqlite and litestream talk has been far too intriguing to ignore. "Wait", you say. "It is just a flat file. How much harder can it be?"

It is easy to make something harder than it should be. It is hard to take something complex and make it truly simple. flyctl launch does an amazing job at providing a simple interface to the utterly complex task of generating deployment resources, especially now that we are living in a containerd (erm, firecracker) world.

This gist is for anyone who, like me, thinks they know better than to read all of the documentation and therefore necessari

@skalahonza
skalahonza / avi-mp4-convert.sh
Created October 16, 2021 14:47
Convert all avi files to mp4 using HW accelerated FFMPEG
for i in *.avi; do ffmpeg -hwaccel cuda -i "$i" "${i%.*}.mp4"; done