Skip to content

Instantly share code, notes, and snippets.

View otanim's full-sized avatar
👁️

Arman Yeghiazaryan otanim

👁️
View GitHub Profile
@mandrean
mandrean / install-nodejs-lts-raspberry-pi-zero-w-armv6
Created November 7, 2022 11:22
Install NodeJS LTS on Raspberry Pi Zero W (ARMv6)
# update system
$ sudo apt update && sudo apt upgrade
# uninstall old node (v10?)
$ sudo apt remove nodejs npm -y
# install nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
# use 'unofficial builds' in nvm
@Chick3nman
Chick3nman / RTX_4090_v6.2.6.Benchmark
Created October 14, 2022 00:07
Hashcat v6.2.6 benchmark on the Nvidia RTX 4090
NVIDIA Driver Version: 522.25 CUDA Version: 11.8
Credit: blazer
For benchmarking the card and allowing me to release the benchmarks here
The hashcat installation used includes a change to the tuning ALIAS.hctune file to include the RTX 4090 as "ALIAS_nv_sm50_or_higher".
The "Kernel exec timeout" warning is cosmetic and does not affect the speed of any of the benchmarked modes.
Benchmark was run at stock clocks on an Asus Strix 4090.
@Plnda
Plnda / controller.js
Last active May 10, 2024 04:36
Get native gamepad working with SteamDeck
var HID = require('node-hid');
const express = require('express');
// Steam Neptune Controller
var device = new HID.HID("/dev/hidraw3");
var port = 8000
var controller = {
id: "Steam Controller (Neptune)",
index: 0,
@Utshaw
Utshaw / installer.sh
Last active May 8, 2024 02:42
install atheros AR9271 driver on Ubuntu
# Add this line in /etc/apt/sources.list
# deb http://httpredir.debian.org/debian/ jessie main contrib non-free
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CBF8D6FD518E17E1
sudo apt-get update --allow-unauthenticated
sudo apt-get install firmware-atheros
sudo dpkg -i --force-overwrite /var/cache/apt/archives/firmware-atheros_0.43_all.deb # if error says error processing archive /var/cache/apt/archives/firmware-atheros_0.43_all.deb
sudo apt -f install # to fix broken packages
@gon1332
gon1332 / fix_vbox_usb.sh
Last active October 14, 2023 15:15
VirtualBox+Ubuntu: Fix USB device list not showing
#!/bin/bash
#
# Heavily inspired by https://github.com/dnschneid/crouton/wiki/VirtualBox-udev-integration
#
vbox_usbnode_path=$(find / -name VBoxCreateUSBNode.sh 2> /dev/null | head -n 1)
if [[ -z $vbox_usbnode_path ]]; then
echo Warning: VBoxCreateUSBNode.sh file has not been found.
exit 1
@alexishida
alexishida / shrink-image-linux.txt
Created May 19, 2019 04:07
Shrink system image on Linux
# Link https://github.com/Adriangarridosanchis/SensorNetwork./wiki/Shrink-system-image-on-Linux
Shrink system image on Linux
benchchair edited this page on 8 Jul 2014 · 16 revisions
Why
The image extracted from a finalized SD card is slightly larger than the capacity of SD card. We need to shrink the size of image so that we can always copy the image into the same capacity SD card or even a smaller one.
# Requirements
A Linux PC or a Linux virtual machine (Virtual machine software: Virtual Box or VMware)
Steps
@kowalcj0
kowalcj0 / .bashrc
Last active July 30, 2023 10:09
Extract all subtitles from a movie using ffprobe & ffmpeg
alias subs=subs
function subs() {
movie="${1}"
filename="${1%.*}"
mappings=`ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 "${movie}"`
OLDIFS=$IFS
IFS=,
( while read idx lang
do
@robhammond
robhammond / verify-client-ids.js
Last active December 14, 2022 06:58
Puppeteer script to check that Google Analytics Client ID is consistent across different platforms
'use strict';
const puppeteer = require('puppeteer');
// Test scenarios
// 4 different entrypoints
// ~8 different cookie setting scenarios (ie every page has at least 1 video)
// 2 different pre-set options - cookies and cookie-less
const reqUrls = [
@cvan
cvan / webgl-detect-gpu.js
Last active January 19, 2024 02:54
use JavaScript to detect GPU used from within your browser
var canvas = document.createElement('canvas');
var gl;
var debugInfo;
var vendor;
var renderer;
try {
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
} catch (e) {
}