Skip to content

Instantly share code, notes, and snippets.

andyrbell /
Last active April 5, 2024 09:01
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
firmanelhakim /
Last active March 5, 2024 15:22
How to Download Vagrant Box Manually
/* this is the box (and the version) that we want to download from: */
wget -O
/* add the box to vagrant */
vagrant box add debian/jessie64
/* update box version */
cd ~/.vagrant.d/boxes/debian-VAGRANTSLASH-jessie64/
mv 0 8.9.0
saurabhshri /
Last active September 24, 2023 11:07
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.


Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.


Setting up Crashplan on FreeNAS Goals

Be able to backup from the FreeNAS box to offsite Crashplan Central. Allow incoming Crashplan backups from other devices. Install the CrashPlan plugin

Install the plugin into a jail: Click on Plugins, then the Available tab, the "crashplan" line and finally the Install button. Once the installation completes, on the left tree, expand Plugins and click on CrashPlan. Accept the Java EULA. Start the Crashplan plugin: Plugins->Installed and make sure the Crashplan plugin is in the "ON" position.

chad3814 / gist:2924672
Last active January 16, 2024 20:27
deleting array items in javascript with forEach() and splice()
// This is from my comment here:
* How to delete items from an Array in JavaScript, an exhaustive guide
// DON'T use the delete operator, it leaves a hole in the array:
var arr = [4, 5, 6];
delete arr[1]; // arr now: [4, undefined, 6]