Skip to content

Instantly share code, notes, and snippets.

View Misairu-G's full-sized avatar

Misairu G Misairu-G

View GitHub Profile
@smo0z
smo0z / ProtonLaunch.sh
Last active April 8, 2024 20:28
Proton Launch Script
#!/bin/sh
# Application path
APP_PATH="$(dirname "${BASH_SOURCE[0]}")"
cd "$APP_PATH"
# Executable file
APP_EXEC="$APP_PATH/.exe"
# Steam / IDs
@abereghici
abereghici / token-interceptor.service.ts
Last active December 29, 2023 17:54
Angular Tutorial — Implement Refresh Token with HttpInterceptor
// src/app/services/token-interceptor.service.ts
import { Injectable } from "@angular/core";
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from "@angular/common/http";
import { AuthenticationService } from "../authentication.service";
import { Observable } from "rxjs/Observable";
import { BehaviorSubject } from "rxjs/BehaviorSubject";
@Injectable()
export class RefreshTokenInterceptor implements HttpInterceptor {
@spheenik
spheenik / 2.12.0.patch
Last active February 16, 2023 21:01
QEMU sound improvement
diff --git audio/audio.c audio/audio.c
index 6eccdb17ee..4eb190a18f 100644
--- audio/audio.c
+++ audio/audio.c
@@ -2097,3 +2097,8 @@ void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
}
}
}
+
+int64_t audio_get_timer_ticks(void)
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
@rplacd
rplacd / optimus.md
Last active January 29, 2024 10:34
Enabling Optimus on your desktop Nvidia GPU.

Enabling Optimus support for your desktop GPU

Windows 10 users: you won't need this guide. NVidia has made signed drivers available with the modifications outlined here, although it's been said you'll have to get them from third-party vendors - distributing them like they do with notebook GPU drivers. I use drivers bundled with the Razer Core enclosure.

@TimSC
TimSC / image-to-v4l2loopback.py
Created September 12, 2013 02:00
Send image data to v4l2loopback using python. Remember to do "sudo modprobe v4l2loopback" first! Released under CC0 by Tim Sheerman-Chase, 2013
#Send image data to v4l2loopback using python
#Remember to do sudo modprobe v4l2loopback first!
#Released under CC0 by Tim Sheerman-Chase, 2013
import fcntl, sys, os
from v4l2 import *
import time
import scipy.misc as misc
import numpy as np
@BigglesZX
BigglesZX / gifextract.py
Created November 5, 2012 10:31
Extract frames from an animated GIF, correctly handling palettes and frame update modes
import os
from PIL import Image
'''
I searched high and low for solutions to the "extract animated GIF frames in Python"
problem, and after much trial and error came up with the following solution based
on several partial examples around the web (mostly Stack Overflow).
There are two pitfalls that aren't often mentioned when dealing with animated GIFs -