Skip to content

Instantly share code, notes, and snippets.

View corndog2000's full-sized avatar

Joe Schroedl corndog2000

View GitHub Profile
@karpathy
karpathy / min-char-rnn.py
Last active July 22, 2024 04:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@drmalex07
drmalex07 / README-oneshot-systemd-service.md
Last active July 7, 2024 19:47
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh:

@alexlee-gk
alexlee-gk / configure_cuda_p70.md
Last active June 21, 2024 03:40
Use integrated graphics for display and NVIDIA GPU for CUDA on Ubuntu 14.04

This was tested on a ThinkPad P70 laptop with an Intel integrated graphics and an NVIDIA GPU:

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204GLM [Quadro M3000M] (rev a1)

A reason to use the integrated graphics for display is if installing the NVIDIA drivers causes the display to stop working properly. In my case, Ubuntu would get stuck in a login loop after installing the NVIDIA drivers. This happened regardless if I installed the drivers from the "Additional Drivers" tab in "System Settings" or the ppa:graphics-drivers/ppa in the command-line.

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 22, 2024 10:23 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@steven2358
steven2358 / ffmpeg.md
Last active July 22, 2024 08:40
FFmpeg cheat sheet
#include <stdio.h>
#include <sys/types.h>
#include <termios.h>
#include <fcntl.h>
#include <stdlib.h>
#define SERIAL_DEVICE "/dev/ttyUSB0"
int main()
{
@Juul
Juul / amazon_fire_2015_7_inc_lineageos_install.md
Last active June 23, 2024 17:51
How to install install LineageOS on a 2015 7" Amazon Fire tablet

This is a guide for getting LineageOS (an older and unofficial version) onto an Amazon Fire 2015 7" tablet (also known as the 5th generation 7" Amazon Fire or under the internal codename "ford").

NOTE: This guide was originally written before someone figured out how to unlock the bootloader. There is now a newer method. Here it is very briefly. The old guide can be found below.

Unlocked bootloader method

First unlock the bootloader using this guide.

Once you're booted into TWRP download the latest LineageOS 14 release for your device here.

@mpolinowski
mpolinowski / certbot.md
Created May 4, 2019 10:41
Manual renew certificate with Certbot / Let's Encrypt (NGINX Plugin)

An issue with one of the domains on the server prevents the cert update/renewal :

certbot renew

ERROR

Cert is due for renewal, auto-renewing...
@Fuwn
Fuwn / xp.md
Last active July 22, 2024 14:08
Windows XP All Editions Universal Product Keys Collection.

Windows XP Logo

Although Microsoft does not support Windows XP updates any more, I'm sure there are still many users using it due to their personal habits or job demands. Therefore, XP's product keys may be necessary even now. Here lies the most comprehensive list of Windows XP product keys.

The following CD keys are official and original from Microsoft, mainly used for Windows XP Professional Service Pack 2/3 VOL/VLK system images, which are the easiest ones to find on the Internet.

@hamidzr
hamidzr / sof-audio-setup-carbonx1.sh
Last active June 2, 2023 01:43
Lenovo Carbon X1 Gen 7 - Audio and microphone fix - https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_7) might be all you need.
#!/bin/bash
# README You probablyl don't need this script anymore. Please read the comments below to catch up.
## Description
# Lenovo Carbon X1 Gen 7 - Audio and microphone fix - kernel 5.3+ required.
# The script has only been tested for Arch and OpenSuse,
# Original thread: https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/td-p/4489823
# Prereq: Install Linux 5.3 or newer