Skip to content

Instantly share code, notes, and snippets.

View aziyan99's full-sized avatar
🖥️
Near From Keyboard

Raja Azian aziyan99

🖥️
Near From Keyboard
View GitHub Profile
@bitterteasweetorange
bitterteasweetorange / keybindings.json
Last active June 25, 2024 03:41
setup vscode like neovim
[
{
"command": "projectManager.listGitProjects#sideBarGit",
"key": "cmd+o"
},
{
"command": "expand_region",
"key": "ctrl+=",
"when": "editorTextFocus"
},
@denguir
denguir / cuda_install.md
Last active June 26, 2024 14:19
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@zrruziev
zrruziev / NUMA node problem.md
Last active June 24, 2024 12:42
Fixing "successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero" problem

What is NUMA (Non-Uniformed Memory Access)

Non-Uniform Memory Access (NUMA) is one of the computer memory design methods used in multiprocessor systems, and the time to access the memory varies depending on the relative position between the memory and the processor. In the NUMA architecture, when a processor accesses its local memory, it is faster than when it accesses the remote memory. Remote memory refers to memory that is connected to another processor, and local memory refers to memory that is connected to its own processor. In other words, it is a technology to increase memory access efficiency while using multiple processors on one motherboard. When a specific processor runs out of memory, it monopolizes the bus by itself, so other processors have to play. , and designate 'access only here', and call it a NUMA node.

1. Check Nodes

lspci | grep -i nvidia
  
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 12GB] (rev a1)
@mallardduck
mallardduck / SomeResource.php
Created April 23, 2021 16:17
SpatieTagsInput for filament
public static function form(Form $form)
{
return $form
->schema([
SpatieTagsInput::make('form_tags')
->relationship('tags', 'name')
]);
}
@vivekhaldar
vivekhaldar / cut_silence.py
Last active June 10, 2024 12:12
Python script to cut out silent parts from a video. Uses moviepy.
#!/usr/bin/env python
#
# Based on a script by Donald Feury
# https://gitlab.com/dak425/scripts/-/blob/master/trim_silenceV2
# https://youtu.be/ak52RXKfDw8
import math
import sys
import subprocess
import os
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active June 22, 2024 03:19
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@sandeepgill
sandeepgill / MoodleValetDriver.php
Last active May 26, 2024 12:07
Laravel Valet Moodle driver
<?php
class MoodleValetDriver extends BasicValetDriver
{
protected $isStyleUri = false;
protected $baseUri = '';
protected $moodleStaticScripts = [
'styles.php',
'javascript.php',
'jquery.php',
@wojteklu
wojteklu / clean_code.md
Last active June 26, 2024 17:29
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

@ricca509
ricca509 / chrome-web-security.sh
Last active August 10, 2023 08:25
Chrome: Disable web security [OSX]
// OSX
open -na Google\ Chrome --args --disable-web-security --user-data-dir="/tmp/chrome_dev"