Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Boxes</title>
<style>.box { width:100px; height:100px; background-color:lightblue; margin:10px; display:inline-block; text-align:center; line-height:100px; }</style>
</head>
<body>
<select id="boxSelect"></select>
@JeffM2501
JeffM2501 / RLAssets.cpp
Last active May 13, 2024 06:05
Basic platform independent asset folder management for raylib.
/*******************************************************************************************
* Welcome to RLAssets!*
* RLAssets is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2020 Jeffery Myers
*
********************************************************************************************/
#include "RLAssets.h"
#include "raylib.h"
@padeoe
padeoe / README_hfd.md
Last active May 13, 2024 05:59
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Boxes</title>
<style>.box { width:100px; height:100px; background-color:lightblue; margin:10px; display:inline-block; text-align:center; line-height:100px; }</style>
</head>
<body>
<select id="boxSelect"></select>
@kometbomb
kometbomb / tweetjam.md
Last active May 13, 2024 05:56
PICO-8 tweetjam stuff

PICO-8 size optimization stuff for tweetcarts

Here are some simple ways to make your PICO-8 code fit in 140 280 characters (as in the #tweetjam #tweetcart craze). I did not invent these, I merely observed and collected them from the tweetjam thread.

LUA syntax stuff

  • Use single character variable names
  • Use x=.1 and x=.023, not x=0.1 or x=0.023
  • x=1/3 is shorter than x=.3333
  • You don't need to separate everything with spaces or write them on their own lines, e.g. circ(x,y,1)pset(z,q,7) works just as well
@thesamesam
thesamesam / xz-backdoor.md
Last active May 13, 2024 05:55
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@wojteklu
wojteklu / clean_code.md
Last active May 13, 2024 05:52
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@Swiss-Mac-User
Swiss-Mac-User / a_Docker setup.md
Last active May 13, 2024 05:51
Installing SonarQube on Docker and SonarScanner using Homebrew on macOS

Docker setup

Install the Docker UI application for macOS

brew install docker --cask

Open the Docker.app

from /Applications/Docker.app

Go to the Docker Dashboard

Wait until the "Docker Dashboard starting…"-message disappears (= Setup complete)

Кунг-фу на клавиатуре. Искусство сочетать клавиши


Сочетания клавиш для тех, кто хочет войти в IT и не только.


Содержание