Skip to content

Instantly share code, notes, and snippets.

View Klice's full-sized avatar

Maxim Cheusov Klice

  • Toronto, Canada
View GitHub Profile
#include <SPI.h>
#include <epd2in7b.h>
#include "imagedata.h"
#include <epdpaint.h>
#include <Wire.h>
#include <ESP8266WiFi.h> // Include the Wi-Fi library
#define SERIAL Serial
#define COLORED 1
@Klice
Klice / jenkins_user_ssh_key.groovy
Created February 8, 2021 23:26
Goorvy script to set SSH key for jenkins admin user
import hudson.model.User
import org.jenkinsci.main.modules.cli.auth.ssh.UserPropertyImpl
User admin = User.getById("admin", false);
UserPropertyImpl adminUserSSHKey = new UserPropertyImpl("some_key_here")
admin.addProperty(adminUserSSHKey);
admin.save()
@Klice
Klice / debian_nvidia_driver_install.md
Last active September 8, 2021 03:07
Debian - Install Nvidia drivers with CUDA toolkit

Clean up:

  • sudo apt-get purge nvidia-*
  • sudo apt-get update
  • sudo apt-get autoremove

Drivers install:

  • sudo apt-get install nvidia-smi nvidia-driver nvidia-cuda-toolkit
~# cat /etc/udev/rules.d/90-rtl.rules
ACTION=="add", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", TAG+="systemd", RUN+="/bin/systemctl --no-block restart rtl_tcp.service"
~# cat /etc/systemd/system/rtl_tcp.service
[Unit]
Description=RTL TCP service
After=network.target
StartLimitIntervalSec=0
[Service]
@Klice
Klice / ifscript.sh
Created November 8, 2023 23:35
WireGuard up/down script
#!/bin/bash
## Usage
# /etc/wireguard/ifscript.sh up %i
# /etc/wireguard/ifscript.sh down %i
action=$1
interface=$2
local_ips=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
vpn_ip="10.6.6.0/24"
@Klice
Klice / gta.py
Created December 11, 2023 07:14
fastest $3B in GTA5
import math
from datetime import timedelta
GOAL = 1000000000
STOCK_BUY_TIME = 10
GLITCH_TIME = 15 * 60
DIVE_TIME = 53
CASE_MONEY = 25000