Skip to content

Instantly share code, notes, and snippets.

@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git
@lsloan
lsloan / float_bug.js
Last active May 13, 2024 23:25
JavaScript floating point math bug example
/*
* Demonstrate JavaScript floating point math bugs by showing
* which two-decimal-place numbers between 0.00 and 1.00 inclusive
* have fractional parts after being multiplied by one hundred.
*/
var i = 0.00;
for (n = 0; n <= 100; ++n) {
j = i * 100;
if (Math.round(j) != j) {
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 13, 2024 23:23
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@alexweberk
alexweberk / mlx_finetuning_gemma.ipynb
Last active May 13, 2024 23:19
MLX Fine-tuning Google Gemma
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Klerith
Klerith / git-alias.md
Last active May 13, 2024 23:02
Useful Git Alias

Log

git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"

Status

git config --global alias.s status --short

Alternativa útil de status

git config --global alias.s status -sb

@rsms
rsms / macos-distribution.md
Last active May 13, 2024 22:58
macOS distribution — code signing, notarization, quarantine, distribution vehicles

How to download from CSDN.net without an account | New method 2023-2024

Brown Simple Minimalist Grand Opening Cake and Bakery Banner.png

CSDN.net is a popular website for programmers and technology enthusiasts to share and access information related to computer science and software development. However, downloading files from CSDN.net can sometimes be a tedious and time-consuming process.

That's where BaiduDownloader.com comes in. We offer a convenient and easy-to-use service for downloading files from CSDN.net quickly and effortlessly. Our platform is designed to make the download process as seamless as possible, with fast download speeds and a user-friendly interface.

Whether you need to download a single file or multiple files from CSDN.net, our service can help you get the job done quickly and efficiently.

@leandrofilipe
leandrofilipe / Raspberry Pi RAID NAS Server Setup.md
Last active May 13, 2024 22:56
Raspberry Pi RAID NAS Server Setup

※ Raspberry Pi RAID NAS Server Setup ※

Hardware:

  • Raspberry Pi 4 (4GB RAM)
  • Micro SD card 32GB
  • 2x Integral USB 3.1 flash drives 128GB

OS:

  • Raspbian Buster
@SterArcher
SterArcher / občine v Sloveniji.csv
Last active May 13, 2024 22:54
Seznam slovenskih občin s poštnimi številkami
poštna številka občina
1000 Ljubljana
1001 Ljubljana – P.P.
1210 Ljubljana – Šentvid
1211 Ljubljana – Šmartno
1215 Medvode
1216 Smlednik
1217 Vodice
1218 Komenda
1219 Laze v Tuhinju