Tumgik
neilad-blog · 10 years
Text
Markdown Test
Markdown
numbered list 1. hello there 1. yes this is a list 1. testing testing 123
I'm an inline-style link I'm an inline-style link with title [I'm a reference-style link][Arbitrary case-insensitive reference text] I'm a relative reference to a repository file [You can use numbers for reference-style link definitions][1] Or leave it empty and use the [link text itself] Some text to show that the reference links can follow later.
Code
var s = "JavaScript syntax highlighting"; alert(s);
s = "Python syntax highlighting" print s
No language indicated, so no syntax highlighting. But let's throw in a <b>tag</b>.
Tables
| Tables | Are | Cool | |
0 notes
neilad-blog · 10 years
Link
0 notes
neilad-blog · 10 years
Text
Install Java and Scala SL6.x
# http://www.oracle.com/technetwork/java/javase/downloads/index.html
sudo rpm -Uvh jdk-7u51-linux-x64.rpm
# scala
# http://www.scala-lang.org/download # http://lancegatlin.org/tech/centos-6-install-scala
wget http://www.scala-lang.org/files/archive/scala-2.10.3.tgz
wget http://www.scala-lang.org/downloads/distrib/files/scala-2.10.1.tgz tar xvf scala-2.10.1.tgz sudo mv scala-2.10.1 /usr/lib sudo ln -s /usr/lib/scala-2.10.1 /usr/lib/scala
nano /etc/profile.d/scala.sh export PATH=$PATH:/usr/lib/scala/bin
nano ~/.bash_profile
#type java
# export JAVA_HOME=/usr/java/default
source ~/.bash_profile
0 notes
neilad-blog · 10 years
Photo
Tumblr media
#Cuda Samples compiled
0 notes
neilad-blog · 10 years
Text
pyopencl benchmark
python benchmark.py Execution time of test without OpenCL: 0.230549812317 s /usr/bin/nvidia-modprobe: unrecognized option: "-u" ERROR: Invalid commandline, please run `/usr/bin/nvidia-modprobe --help` for usage information.
0 notes
neilad-blog · 10 years
Photo
Tumblr media
Site for sore eyes!
0 notes
neilad-blog · 10 years
Text
Compiling PyOpenCL 2013 on Scientific Linux 6.x
# pre
sudo easy_install pip
yum install tkinter python-imaging python-imaging-tk
git clone http://git.tiker.net/trees/pyopencl.git
cd pyopencl
git submodule init
git submodule update
python configure.py --cl-enable-gl \
  --cl-inc-dir=/usr/local/cuda-5.5/include \
  --cl-lib-dir=/usr/local/cuda-5.5/lib64 \
0 notes
neilad-blog · 10 years
Text
Cuda 5.5 on Scientic Linux 6.x
# from fresh install of SL6
su
visudo  # add self to the users
sudo yum -y install openssh-server openssh-clients
sudo chkconfig sshd on
sudo service sshd start
sudo yum install python-pip.noarch PyOpenGL.noarch \
elrepo-release \
python-devel boost mesa-libGL-devel mesa-libGLU-devel libXi-devel libXmu-devel freeglut-devel
# # # cuda pre-install
#edit /etc/grub.conf, add
rdblacklist=nouveau 3
# reboot
sudo yum install elrepo-release
sudo yum install kmod-nvidia nvidia-x11-drv
# then run sh cuda_5.x_linux.run as su
don't install driver!
# set gcc LD path (x64) to library files
# add /usr/local/cuda-5.5/bin to path
# Compile samples
0 notes
neilad-blog · 11 years
Link
0 notes
neilad-blog · 11 years
Text
[ubuntu] turn off the screen from the command line
# !/bin/bash # turn off the screen from the command line export DISPLAY=:0 gnome-screensaver-command -l xset dpms force off
0 notes
neilad-blog · 12 years
Photo
Tumblr media
http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/
0 notes
neilad-blog · 12 years
Link
0 notes
neilad-blog · 12 years
Link
0 notes
neilad-blog · 12 years
Photo
Tumblr media
focus on FOCAL!
0 notes
neilad-blog · 12 years
Link
0 notes
neilad-blog · 12 years
Photo
Tumblr media
Document Map in Notepad++ Version 6 + !
0 notes
neilad-blog · 12 years
Text
NSIS installer for Windows
I've been wanting to create a custom windows installer for a while, I have known about NSIS for sometime, but was using the 7zip SFX installer.
I wanted a very basic installer, bundle up some files into an exe, set the default path, add a little eye candy in the way of graphics. NSIS can access the registry reading and adding entries, but I'm just installing a plugin, and it seems a little overkill for what I wanted.
NSIS is actually great, the forums at winamp, not so much. It might be just that I have got used to stackoverflow's very helpful userbase, but I found the answers at winamp, less than helpful, "just read the documentation" one said, that's not what you need when you're just starting out, you want to get something working asap!
The method I was trying was to the zip2exe NSIS installer builders, then hack the .log file, but the it was producing a large list of files to add to the installer at compile time, I didn't fancy try to write a .bat file to list all the files.
So eventually I found the magic command was:
  SetOutPath "$INSTDIR\"
  File /r "*.*" ; 
File /r recurses the given directory (bit like "dir /s") 
so in my case it was
  File /r "..\..\..\..\*.*"
Other Tips:
If you're installing to program files, you will need (esp on windows 7!)
RequestExecutionLevel admin
MUI_ICON .ico files need to be proper icon files (you can save these in Gimp) 48x48 pixels
MUI_WELCOMEFINISHPAGE_BITMAP needs to be 164x314 8 bit depth (255 colours)
Some useful references
http://ctlabs.blogspot.co.uk/2009/02/nullsoft-scriptable-install-system-nsis.html
So my code ended up looking something like this:
; Define your application name
!define APPNAME "Images2SU"
!define APPNAMEANDVERSION "Images2SU"
; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\Google\Google SketchUp 7\Plugins"
OutFile "Images2SU.exe"
RequestExecutionLevel admin
; Use compression
SetCompressor LZMA
; Modern interface settings
!include "MUI.nsh"
;--------------------------------
;Interface Configuration
  !define MUI_HEADERIMAGE
  !define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
  !define MUI_ICON "icon.ico"
  !define MUI_ABORTWARNING
;--------------------------------
; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_RESERVEFILE_LANGDLL
Section "Images2SU" Section1
; Set Section properties
SetOverwrite on ;ifnewer
; Set Section Files and Shortcuts
SetOutPath "$INSTDIR\"
File /r "..\..\..\..\*.*"
SectionEnd
; Modern install component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} ""
!insertmacro MUI_FUNCTION_DESCRIPTION_END
BrandingText "Acoustic Dimensions"
0 notes