Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Banasiak banasiak

View GitHub Profile
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active Aug 5, 2020
[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 )
View XPS-15 9560 Getting Nvidia To Work on KDE Neon
# 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
View convert.sh
echo Converting $1
mkdir -p res/drawable-mdpi
mkdir -p res/drawable-hdpi
mkdir -p res/drawable-xhdpi
mkdir -p res/drawable-xxhdpi
m=48
h=72
x=96
@eyecatchup
eyecatchup / hammerhead-from-lrx21o-to-lrx22c.md
Last active Jun 23, 2020
A step-by-step guide how to manually flash the Android 5.0.1 (LRX22C) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..
View hammerhead-from-lrx21o-to-lrx22c.md

Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):
https://gist.github.com/eyecatchup/dab5cf7977008e504213


  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;
@Jimbly
Jimbly / DefaultKeyBindings.dict
Last active Apr 29, 2020
Mac OSX keybindings to more closely match Windows
View DefaultKeyBindings.dict
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely
match default behavior on Windows systems.
You must log out and back in to see these changes.
Here is a rough cheatsheet for syntax.
Key Modifiers
^ : Ctrl
$ : Shift
@kenmickles
kenmickles / update-digitial-ocean-dns.sh
Last active May 22, 2019
Shell script to dynamically update a Digital Ocean DNS record
View update-digitial-ocean-dns.sh
#!/bin/bash
TOKEN="Get token from https://cloud.digitalocean.com/settings/applications"
DOMAIN=example.com
RECORD_ID=12345
IP=`curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+'`
# to get record id:
# curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN" "https://api.digitalocean.com/v2/domains/$DOMAIN/records"
@ybakos
ybakos / GraphicGlDemoActivity.java
Created Nov 27, 2012
A simple example of using an Android Renderer to illustrate OpenGL ES boilerplate.
View GraphicGlDemoActivity.java
/* GraphicGlDemoActivity.java
* Author: Yong Bakos
* Since: 11/26/2012
* Thanks to:
* Cube: http://intransitione.com/blog/create-a-spinning-cube-with-opengl-es-and-android/
* OpenGL Boilerplate: http://www.jayway.com/2009/12/03/opengl-es-tutorial-for-android-part-i/
*/
package com.humanoriented.sudoku;
import java.nio.ByteBuffer;
@amarraja
amarraja / gist:3938304
Created Oct 23, 2012
Replace system notepad with notepad++
View gist:3938304
REM Replaces notepad.exe with notepad++. Here for reference since I can never find it
REM Taken from here: http://blogs.itramblings.com/post/2009/02/08/How-to-replace-notepadexe-on-Windows-Server-2008.aspx
@echo off
echo Create Backup copies of the original notepad.exe
copy C:\Windows\notepad.exe C:\Windows\notepad32.exe
copy C:\Windows\System32\notepad.exe C:\Windows\System32\notepad32.exe
copy C:\Windows\SysWOW64\notepad.exe C:\Windows\SysWOW64\notepad32.exe
You can’t perform that action at this time.