Nginx: Add string responses for error codes
http://stackoverflow.com/a/13655998
location / { error_page 404 @sorry; } location @sorry { return 404 "<H1>Sorry!</H1>"; }
Misplaced Lens Cap
Xuebing Du

taylor price

todays bird
h
$LAYYYTER

Product Placement

ellievsbear
2025 on Tumblr: Trends That Defined the Year

pixel skylines

JBB: An Artblog!
NASA

Love Begins

oozey mess
cherry valley forever
we're not kids anymore.
seen from United States
seen from Bangladesh
seen from United States
seen from Belgium
seen from United States

seen from United States
seen from United Kingdom

seen from Malaysia

seen from United Kingdom

seen from United States

seen from Netherlands
seen from United States
seen from United States
seen from Singapore
seen from Poland

seen from Malaysia
seen from Netherlands

seen from United States
seen from Russia

seen from United Kingdom
@metalambda
Nginx: Add string responses for error codes
http://stackoverflow.com/a/13655998
location / { error_page 404 @sorry; } location @sorry { return 404 "<H1>Sorry!</H1>"; }

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Python: Virtualenv
virtualenv is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need.
Install virtualenv via pip:
$ pip install virtualenv
Basic Usage
Create a virtual environment for a project:
$ cd my_project_folder $ virtualenv venv
virtualenv venv will create a folder in the current directory which will contain the Python executable files, and a copy of the pip library which you can use to install other packages. The name of the virtual environment (in this case, it was venv) can be anything; omitting the name will place the files in the current directory instead.
This creates a copy of Python in whichever directory you ran the command in, placing it in a folder named venv.
You can also use a Python interpreter of your choice.
$ virtualenv -p /usr/bin/python2.7 venv
This will use the Python interpreter in /usr/bin/python2.7
To begin using the virtual environment, it needs to be activated:
$ source venv/bin/activate
The name of the current virtual environment will now appear on the left of the prompt (e.g. (venv)Your-Computer:your_project UserName$) to let you know that it’s active. From now on, any package that you install using pip will be placed in the venvfolder, isolated from the global Python installation.
Install packages as usual, for example:
$ pip install requests
If you are done working in the virtual environment for the moment, you can deactivate it:
$ deactivate
This puts you back to the system’s default Python interpreter with all its installed libraries.
To delete a virtual environment, just delete its folder. (In this case, it would be rm -rfvenv.)
After a while, though, you might end up with a lot of virtual environments littered across your system, and its possible you’ll forget their names or where they were placed.
Other Notes
Running virtualenv with the option --no-site-packages will not include the packages that are installed globally. This can be useful for keeping the package list clean in case it needs to be accessed later. [This is the default behavior for virtualenv 1.7 and later.]
In order to keep your environment consistent, it’s a good idea to “freeze” the current state of the environment packages. To do this, run
$ pip freeze > requirements.txt
This will create a requirements.txt file, which contains a simple list of all the packages in the current environment, and their respective versions. You can see the list of installed packages without the requirements format using “pip list”. Later it will be easier for a different developer (or you, if you need to re-create the environment) to install the same packages using the same versions:
$ pip install -r requirements.txt
This can help ensure consistency across installations, across deployments, and across developers.
Lastly, remember to exclude the virtual environment folder from source control by adding it to the ignore list.
Junos: How to Obtain a DHCP Client IP address on the SRX firewall?
To obtain an IP address from your ISP via DHCP to load on an interface on the SRX firewall, you will need to enable DHCP client on the interface, and also as a host inbound service on the interface on the security zone.
For example, assume interface fe-0/0/2.0 is directly connected to a cable modem, which obtains an IP address from the ISP via DHCP. Navigate to the interface level to specify DHCP:
interfaces { fe-0/0/2 { unit 0 { family inet { dhcp; } } } }
Then, navigate to the security zone that the interface is tied to, and specify dhcp as a host-inbound service:
security { zones { security-zone untrust { screen untrust-screen; interfaces { fe-0/0/2.0 { host-inbound-traffic { system-services { dhcp; } } } } } }
}
To force a DHCP renewal, from operational mode, issue the following command:
root> request system services dhcp renew fe-0/0/2.0
Postfix: Queue Management
https://rtcamp.com/tutorials/mail/postfix-queue/
Linux: Remove unused kernels
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs apt-get -y purge

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Manually update all spacemacs packages
* Open emacs.
* SPC-a-P, U, x, y (using Paradox)
Windows: How to fully shut down Window 8 (& 8.1)
* Press [Windows key + R] on your keyboard (This opens the "Run" box)
* cmd
* shutdown -s -t 00
Five programming problems every Software Engineer should be able to solve in less than 1 hour
Problem 1
Write three functions that compute the sum of the numbers in a given list using a for-loop, a while-loop, and recursion.
Problem 2
Write a function that combines two lists by alternatingly taking elements. For example: given the two lists [a, b, c] and [1, 2, 3], the function should return [a, 1, b, 2, c, 3].
Problem 3
Write a function that computes the list of the first 100 Fibonacci numbers. By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two. As an example, here are the first 10 Fibonnaci numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, and 34.
Problem 4
Write a function that given a list of non negative integers, arranges them such that they form the largest possible number. For example, given [50, 2, 1, 9], the largest formed number is 95021.
Update: Apparently this problem got a lot of people talking (although not as much as Problem 5 below.)
Problem 5
Write a program that outputs all possibilities to put + or - or nothing between the numbers 1, 2, ..., 9 (in this order) such that the result is always 100. For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 = 100.
Git: How to undo (almost) anything
https://github.com/blog/2019-how-to-undo-almost-anything-with-git
Emacs: Use goimports instead of gofmt when saving a go source file
Open ~/.spacemacs.
Search for “;; User initialization goes here”.
Add the following line just after:
(setq gofmt-command "goimports")
Save, exit and restart emacs.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Git: Rename local and remote branches
it branch -m old_branch new_branch # Rename branch locally git push origin :old_branch # Delete the old branch git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
Save current Junos config locally
show configuration | save /tmp/before-some-event
To restore that file:
load override /tmp/before-some-event
commit
Paste in Junos config
load override terminal <paste it in, curly braces and all> Ctrl+d commit and-quit
Reset Junos outbound ssh management
> configure > deactivate system services outbound-ssh > commit > activate system services outbound-ssh > commit
Repeat as required.
Check for ncd connections on a Junos device
> show system connections | grep 4087

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Missing OSXFUSE volume after Mac goes to sleep
* kill -i `pgrep -lf sshfs | awk ‘{print $1}’`
* sudo umount -f LOCAL_MOUNT_POINT
* sshfs <REMOTE>:<PATH_TO_MOUNT> <LOCAL_MOUNT_POINT>
Screen Share Ubuntu 14.04 to Mac
https://www.youtube.com/watch?v=C6CHRMba04g
* Install dconf-editor.
* Navigate to org -> gnome -> desktop -> remoteaccess.
*Uncheck require-encryption.
* Close dconf-editor window.