Skip to content

Instantly share code, notes, and snippets.

View debsankha's full-sized avatar

Debsankha Manik debsankha

View GitHub Profile
@debsankha
debsankha / xorg.conf.dual_gpu
Created July 24, 2014 08:21
xorg.conf for dual GPU triple monitor setup using one nvidia GPU and onboard intel GPU, uses xinerama and zaphodhead
Section "ServerLayout"
Identifier "Layout0"
Screen "left" 0 0
Screen "center" RightOf "left"
Screen "right" RightOf "center"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "true"
EndSection
@debsankha
debsankha / .travis.yml
Last active August 29, 2015 16:13
Speeding up Travis builds for python projects that depend on scipy
sudo: false # ensures the new container based infrastructure is used.
language: python
cache:
directories:
- $HOME/.cache/pip
python:
- '2.7'
- '3.4'
addons:
@debsankha
debsankha / mpids_cuda_mar03_2016.md
Last active March 25, 2016 18:02
mpids-CUDA First meeting

Take home messages

  1. Using CUDA makes sense for massively parallelizable code, like matrix multiplication.
  2. But copying data from host memory (RAM) to GPU is slow.
  3. MATLAB has many CUDA aware functions. For testin, you can use MATLAB on sunna (node 01 - 08 only, please).
  4. Generating random numbers and copying it back to host RAM was seen to be about 3 times faster while using CUDA.
  5. But "raw" CUDA C/C++ needs a lot of boilerplate code to be written. Hecke tells me that this is changing/has changed a lot in newer versions of CUDA.

Using CUDA on sunna

Tell bash about CUDA

@debsankha
debsankha / iptable_rules.sh
Last active February 21, 2017 21:13
Transparent proxy with squid and iptables
#!/bin/sh
# squid server IP
SQUID_SERVER="192.168.1.5"
# Interface connected to Internet
INTERNET="enp3s1"
# Interface connected to LAN
LAN_IN="enp1s0"
# Squid port
SQUID_PORT="3128"
# DO NOT MODIFY BELOW
@debsankha
debsankha / autosetup_external_monitor.py
Last active August 3, 2023 12:27
Automatically setup external monitors
"""
Automatically setup external monitors at MOIA so that it's to the right of the
internal screen
Prerequisite: [displayplacer](https://github.com/jakehilborn/displayplacer)
```bash
brew tap jakehilborn/jakehilborn && brew install displayplacer
```