Skip to content

Instantly share code, notes, and snippets.

View krusli's full-sized avatar

Kenneth Aloysius krusli

View GitHub Profile
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active July 1, 2024 05:32
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@MadeBaruna
MadeBaruna / README.md
Last active June 10, 2024 07:48
Get Genshin Impact wish history link
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active July 5, 2024 07:14
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@MadeBaruna
MadeBaruna / importer.ps1
Last active July 6, 2024 00:21
Paimon.moe Local Importer (Windows)
Add-Type -AssemblyName System.Web
Write-Host "Paimon.moe Wish Importer" -ForegroundColor Cyan
Write-Host "1. Open Genshin Impact in this PC"
Write-Host "2. Then open the wish history and wait it to load"
Write-Host "3. When you are ready press [ENTER] to continue! (or any key to cancel)"
Write-Host "Waiting..."
$keyInput = [Console]::ReadKey($true).Key
if ($keyInput -ne "13") {
@lwzm
lwzm / app.py
Last active August 5, 2022 14:37
gunicorn and pyinstaller and file-upload-app
#!/usr/bin/env python3
import shutil
from flask import Flask, Response, request
app = Flask(__name__)
@app.route('/<path:path>', methods=['GET', 'POST'])
def hello(path):
@nooges
nooges / VIA Porting Info.md
Last active November 17, 2022 15:57
Info on adding VIA Configurator support to a board using QMK

Making a board compatible with VIA Configurator

💥NOTE💥: Don't do this yet, all of this stuff is still 🚑💣BLEEDING EDGE💣🚑, and you will 🔪cut yourself🔪 badly if you choose to do it. Please wait for 🗿Wilba's QMK code to be refactored prior to pushing anything to QMK, as we don't want to end up with a bunch of different forks of the code.

So you've seen VIA Configurator in action, and you want to get this magic supported for your board?

There's two main steps:

  1. Add dynamic keymap support to keyboard in QMK
  2. Add layout to VIA
@ryands
ryands / docker-compose.yml
Created August 9, 2018 00:19
gitlab-ce omnibus docker behind a local nginx reverse proxy (letsencrypt ssl termination at local nginx)
version: '3'
services:
gitlab:
image: gitlab/gitlab-ce:latest
hostname: gitlab.example.com
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com/'
nginx['listen_port'] = 80
nginx['listen_https'] = false
@kodekracker
kodekracker / draw_bounding_box_open_cv.py
Created June 20, 2018 18:31
To draw Bounding Box in a image using OpenCV python module
#!/usr/bin/env python
import cv2
import sys
def drawBoundingBoxes(imageData, imageOutputPath, inferenceResults, color):
"""Draw bounding boxes on an image.
imageData: image data in numpy array format
imageOutputPath: output image file path
inferenceResults: inference results array off object (l,t,w,h)
colorMap: Bounding box color candidates, list of RGB tuples.
@ricardojba
ricardojba / windows_hardening.cmd
Last active July 1, 2024 19:59
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,
@bastman
bastman / optionalToNullable.kt
Created January 31, 2018 10:39
Kotlin extension function to convert Java8 Optional<T> to Kotlin nullable T?
fun <T : Any> Optional<T>.toNullable(): T? {
return if (this.isPresent) {
this.get()
} else {
null
}
}