Skip to content

Instantly share code, notes, and snippets.

View wizofe's full-sized avatar
😬
Focusing

Ioannis Valasakis wizofe

😬
Focusing
View GitHub Profile
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 23, 2024 02:03
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@MartyMacGyver
MartyMacGyver / RPi_Kernel_building_with_optional_kmemleak_etc.sh
Last active June 28, 2018 13:57
Building the kernel for the Raspberry Pi/Pi2/Pi3 (with headers and optional memory leak debugging steps)
###############################################################################
# Compiling the RPi kernel in situ, with optional memory leak debugging
#
# Extends https://www.raspberrypi.org/documentation/linux/kernel/building.md
###############################################################################
# On the Raspberry Pi
cd ~/Projects
# Install rerequisites
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active April 27, 2024 01:22
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@yvesh
yvesh / .Xdefaults
Last active August 31, 2018 12:26
URxvt Xdefaults config
URxvt.saveLines: 2000
URxvt.scrollBar: false
URxvt.foreground: #f9f7f1
URxvt.depth: 32
URxvt.secondaryScroll: true
URxvt.font: xft:DejaVu Sans Mono for Powerline:pixelsize=22:antialias=true
URxvt.perl-ext-common: default,matcher,selection-to-clipboard
URxvt.urlLauncher: chromium
URxvt.matcher.button: 1
URxvt.tabbed.saveLines: 2000
@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active March 24, 2024 14:35
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@zachwill
zachwill / 538_colors.py
Created October 10, 2015 21:20
A simple FiveThirtyEight palette for Seaborn plots.
"""
A simple FiveThirtyEight palette for Seaborn plots.
"""
import seaborn as sns
import matplotlib.pyplot as plt
five_thirty_eight = [
"#30a2da",
"#fc4f30",
@mikecharles
mikecharles / activate.csh
Last active October 31, 2021 19:38
Activate and deactivate a conda environment in C Shell
#!/bin/csh
# Get the name of this script
if ( $?_ ) then
# With tcsh the name of the file being sourced is available in
# $_.
set script_name = `basename $_`
else
# Fall back to $0 which, sometimes, will be the name of the
@smoitra87
smoitra87 / python2pdf.sh
Last active August 15, 2019 15:02
Convert python files to pdf and concatenate all pdfs. Requires pygmentize, pdflatex and pdftk
#!/bin/sh
allpdfs=""
for f in "$@" ; do
filename=$(basename "$f")
filename="${filename%.*}"
pygmentize -f tex -O linenos -O title=$( echo $filename | tr '_' '-').py -O full -O style=default -o /tmp/$filename.tex $f
pdflatex -jobname=$filename -output-directory=/tmp /tmp/$filename.tex
allpdfs="$allpdfs /tmp/$filename.pdf"
anonymous
anonymous / gist:5222225
Created March 22, 2013 15:35
##############################################################################################
##Running fsl from the command line
##some commands that I find useful
##
##############################################################################################
##############################################################################################
##############################################################################################
##Using the fslmaths and fslstats toolboxes
##############################################################################################
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs