Skip to content

Instantly share code, notes, and snippets.

@nerdralph
nerdralph / kernel4.10.5.sh
Created Mar 25, 2017
Ubuntu 16 kernel 4.10.5 install
View kernel4.10.5.sh
#!/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 Dec 27, 2016
llvm/OpenCL setup
View setup.sh
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 Oct 29, 2016
python zcash mining calculator
View zec.py
#!/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 Jun 4, 2016
script to set clocks on AMD GPUs
View clocks.txt
1150,1500 R7 370
820,1500 380
1150,1250 67B1
@nerdralph
nerdralph / py35.sh
Last active Jan 19, 2018
Python 3.5.1 download and install script for RPM-based Linux platforms
View py35.sh
#!/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