Skip to content

Instantly share code, notes, and snippets.

@nerdralph
nerdralph / kernel4.10.5.sh
Created March 25, 2017 18:06
Ubuntu 16 kernel 4.10.5 install
#!/bin/sh
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.5/linux-headers-4.10.5-041005_4.10.5-041005.201703220931_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.5/linux-headers-4.10.5-041005-generic_4.10.5-041005.201703220931_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.5/linux-image-4.10.5-041005-generic_4.10.5-041005.201703220931_amd64.deb
sudo dpkg -i *.deb
@nerdralph
nerdralph / setup.sh
Last active December 27, 2016 16:26
llvm/OpenCL setup
wget -q -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main"
sudo apt-get update
sudo apt-get install clang-3.9
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 10
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.9 10
#install POCL deps http://portablecl.org/docs/html/install.html
# sudo apt-get install libhwloc-dev
@nerdralph
nerdralph / zec.py
Last active October 29, 2016 21:17
python zcash mining calculator
#!/usr/bin/python2
# arg1 = current block number
# arg2 = current network rate in thousands of solutions per second
# arg3 = your solution rate
BLOCKS_PER_DAY = 576*10 # 2.5 minute block time
RAMP_BLOCKS = 20000 # mining slow start
import sys
@nerdralph
nerdralph / clocks.txt
Created June 4, 2016 22:31
script to set clocks on AMD GPUs
1150,1500 R7 370
820,1500 380
1150,1250 67B1
@nerdralph
nerdralph / py35.sh
Last active January 19, 2018 20:35
Python 3.5.1 download and install script for RPM-based Linux platforms
#!/bin/sh
sudo yum -y update
sudo yum -y groupinstall "Development tools"
sudo yum -y install zlib-devel openssl-devel
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
tar xJf Python-3.5.1.tar.xz
cd Python-3.5.1
./configure --prefix=/usr/local
sudo make install
python3 --version