Forward HTTP through an intermediary server (Local Port Forwarding)
This will tunnel HTTP requests to one given domain and port through an intermediary SSH server:
ssh -L 8080:targethost:80 tunnelhost
http://localhost:8080 will now connect you to http://targethost:80, tunnelling all data through tunnelhost
via SSH.
Note that the connection between tunnelhost and targethost will still be unencrypted in this example.
Related cards:
Guide to localizing a Rails application
Localizing a non-trivial application can be a huge undertaking. This card will give you an overview over the many components that are affected.
When you are asked to give an estimate for the effort involved, go through the list below and check wh...
Get Moving With Angular 1.2 Animation and Animate.css
Motion is quickly becoming one of the most important emerging techniques in building a quality user experience on the web. Angular 1.2, currently in release candidate form, provides an overhaul of Angular's animation system and makes it spectacu...
Local development with SSL and Puma
Sometimes the need arises for SSL in local development. We have guides for different webservers, this one is for puma.
- make sure [mkcert is installed](/makandra/15901-howto-create-...
Creating a self-signed certificate for local HTTPS development
Your development server is usually running on an insecure HTTP connection which is perfectly fine for development.
If you need your local dev server to be accessible via HTTPS for some reason, you need both a certificate and its key. For a local ...
Make an HTTP request to a machine but fake the hostname
Consider you have a website vhost listening to www.example.com
, redirecting all incoming requests that do not talk about the configured hostname (this is often used to redirect users to http://www.example.com
when entering only `http://example...
Angular: Quick and easy animation on changed binding value
With ngAnimate, you can easily animate certain events (see directive support). We'll make use of ngClass
animations to style an element on changed binding value.
Say we have a slider and ...
Vortrag: Elasticsearch Grundlagen und Rails-Integration mit searchkick
Was ist Elastic?
- Suchmaschine, basierend auf Apache Lucene
- größtenteils Open-Source
- einige kommerzielle Features ("Elastic Stack", früher "X-Pack")
- Zugriffsrechte (bis vor kurzen)
- Monitoring
- Reporting
- Graph-Unterstützung...
How to create giant memory leaks in AngularJS (and other client-side JavaScript)
This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process crashes on your users.
Although this guide has been written for Angular 1 originally, most of the advice is relevant...
How to run a small web server (one-liner)
Sometimes you just want to have a small web server that serves files to test something.
Serve the current directory
On Ruby 1.9.2+ you can do the following (".
" for current directory).
ruby -run -ehttpd . -p8000
Python 2.x offers a s...
Soft-scroll to an anchor with jQuery
This snippet makes links that refer to an anchor (like "<a href="#something">...</a>
") scroll softly to it.\
In this example we only do it for links that also own a data-animate
attribute.
$('a[href^="#"][data-animate]').live('click', fu...