# nVidia CUDA samples on Ubuntu 16.04 LTS

Here they are in case anyone else needs to download them separately (and the rest of cuda-repo-ubuntu1504-7-5-local_7.5-18_amd64.deb):

The file you’re looking for is var/cuda-repo-7-5-local/cuda-samples-7-5_7.5-18_amd64.deb

To extract and compile the samples (make sure you have your nVidia GPU active if you’re using Optimus, e.g. by using

sudo prime-switch nvidia

or otherwise;

nvidia-smi

# First Foray into MIPS Assembly

Task: Print Hello World 10 times.

# How to fix popping on audio start/stop/resume with Intel HDA audio in Linux

https://wiki.archlinux.org/index.php/Alsa#Pops_when_starting_and_stopping_playback My ears were nearly wrecked by this awfulness. On a side note, the Conexant Audio CX20751/2 isn’t the best integrated sound card around. Even lowly Realteks have far better dynamic range and equalization. There is virtually no soundstage, mids are very muffled, even with headphones. It can be found on some lower end Thinkpads (e.g. S440/E440); considering that these are cheap SMB laptops it’s not surprising that they had to cut corners somewhere.

# Another alternative to checkinstall

Checkinstall didn’t work for me in CentOS 7 even after following this guide: http://www.patrickmin.com/linux/tip.php?name=checkinstall_fedora_13 and using –fstrans = no. Solution: https://github.com/jordansissel/fpm Using nginx 1.7.3 as an example:

Of course, this is by no means a substitute to properly packaging packages for upstream using rpm-build, but it is perfect for compiling from source quickly without having files strewn all over the place, especially when there is no make uninstall.

# GNU Screen on Steroids

Note: This is an old post, from an old blog far, far away Append this to your ~/.bashrc:

If you want to keep your splits/panes persistent even when you detach: The short is answer is that you can’t. The longer answer is that you can fake it. (Note: the next screen release, probably numbered 4.1.0, will be able to remember display layouts.) Splits are a property of your display. The process managing your screen session doesn’t really know about them; only the single process that’s displaying the session does. Thus, the screen session can’t remember the splits because it doesn’t know about them, and once you detach, the process that did know about them has exited. The hack is to use nested screen sessions. Start one session and give it some escape sequence that you won’t use much (or just disable its escape character completely). Bind your usual detach key sequence to this screen session. Now, start or attach to your main screen session. All of your work will be done in the inner session, and you can split your display. When you detach, however, it will be the outer session that detaches, so your splits in the inner session will be preserved.

http://aperiodic.net/screen/faq#when_i_split_the_display_and_then_detach_screen_forgets_the_split

# Compiling UnrealIRCD on an iPod Touch 2G

Note: This is an old post, from an old blog far, far away

# Prerequisites

wget "http://www.unrealircd.com/downloads/Unreal3.2.10.1.tar.gz" | tar -xvzf -

# Configuring

For some reason I had to run the ./configure as root after cd’ing into the directory where I extracted the files as the mobile user; perhaps due to an inability to run unsigned applications?

checking whether we are cross compiling… configure: error: in /var/mobile/Unreal3.2.10.1': configure: error: cannot run C compiled programs. If you meant to cross compile, use–host’.

After running as root, everything went rather smoothly. Edit dpath and spath as you wish.

I forgot to use ‘time’ but estimate it perhaps took around 20 minutes. After make && make install:

to generate the certificate and key needed for the SSL connection. After running ./unreal start ; it required some source modules in the build folder and the config file for the IRCD.

Edit the config file as you wish!…

# On calling su in an Android App

http://su.chainfire.eu/#how I noticed that https://github.com/koush/Superuser‘s su binary requires quotes around the target command, or else it won’t execute properly.

The “solution” is to write the intended su -c command to a shell script file and then call it with ProcessBuilder:

# Compiling http://www.darwinsys.com/file/ for Android

Cross compiling is always a PITA, so here goes:

I have android-ndk-r9c extracted to my home directory.

See https://stackoverflow.com/questions/6881164/crtbegin-so-o-missing-for-android-toolchain-custom-build as to why those two files need to be linked. The magic.mgc file is going to be placed in /system/share/misc/magic on the device. Copy all the files into /system on the device, and create the symlink to libmagic.so in /system/lib if it hasn’t been created

If all works well,

# Alternative to checkinstall

When you want to remove the symlinks created in /usr/local/ for your particular program:

Extremely useful in Cygwin where checkinstall and package managers aren’t available.

Linux Meta android file gnu