Skip to content

Instantly share code, notes, and snippets.

@ericjang
Last active April 20, 2016 20:54
Show Gist options
  • Save ericjang/868d54d419b304d998c68bd5baa484c8 to your computer and use it in GitHub Desktop.
Save ericjang/868d54d419b304d998c68bd5baa484c8 to your computer and use it in GitHub Desktop.

#Brown CS Potions Textbook:

  • List available printers: lpstat -p -d
  • removing something from gnome menubar: windows + alt + right click -> option to remove
  • Screen Recording: Get window id: xwininfo -display :0, then use recordmydesktop
  • Find out who's logged in: who
  • GTX970 GPUs: cslab6a-6h, gemini, pastorale, pokemon
  • penny has a 550 GTX Ti GPU
  • Makes application full screen: F11 key
  • zwrite : message other users
  • see who's logged in inside building floor 1
  • see specs of machine: uname -a
  • All dept machines have CUDA enabled over SSH, but not OpenGL $DISPLAY variable.
  • printing: lpr -P bw3 -h -o sides=one-sided -o page-ranges=3,4-9 report.pdf
  • Google-chrome cache (remap it to full disk) : cd ~/.cache; ln -s /dev/full google-chrome
  • Shebang: #!/usr/bin/env python
  • Show members of a UNIX group: members cs224ta
  • timing - measure real-time and user seconds : time ./a.out
  • get NVIDIA driver version: cat /proc/driver/nvidia/version
  • Reverse SSH Tunnel

GridEngine

#startGenHeatmap
#!/usr/bin/python

import sys
import os


nAnimalTypes = 2
nAnimalsPerGroup = 25
nConn = 3
nStim = 4

nJobs = nAnimalTypes*nAnimalsPerGroup*nConn*nStim
bash_cmd = "qsub -t 1-%d -l day runGenHeatmap" % nJobs
print(bash_cmd)
os.system(bash_cmd)
#runGenHeatmap
#!/usr/bin/python

import sys
import os

job_id = os.environ.get('SGE_TASK_ID','0') 
matlab_cmd = 'cd /data/people/evjang/TectalModel/experiments; generate_heatmaps_2(%d); exit' % (int(job_id))
bash_cmd = "/local/bin/matlab -nodisplay -nosplash -nodesktop -r \'%s\'" % (matlab_cmd)
print(bash_cmd)
os.system(bash_cmd)

Shared Libraries

  • Find out whether lib installed ldconfig -p | grep libjpeg

FIXING CUDA

when library missing (libmpc.so.2), try "locate libmpc" and you will get a list of libraries installed that match. you can use ln -s source target to swap in newer libs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment