To setup your computer to work with *.locahost domains, e.g. project.localhost, awesome.localhost and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> Catalina
To setup your computer to work with *.locahost domains, e.g. project.localhost, awesome.localhost and so on, without having to add to your hosts file each time.
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
List() | |
var list = Immutable.List([1,2,3]) | |
// [1, 2, 3] | |
List.isList() | |
Immutable.List.isList(list) | |
// true | |
List.of() | |
var list = Immutable.List.of(1,2,3); |
<!-- Example #1 - no styling --> | |
Made with ❤ in Switzerland | |
<!-- Example #2 - inline-styled ❤ --> | |
Made with <span style="color: #e25555;">♥</span> in Switzerland | |
Made with <span style="color: #e25555;">♥</span> in Switzerland | |
<!-- Example #3 - CSS-style class for ❤ --> | |
<style>.heart{color:#e25555;}</style> | |
Made with <span class="heart">❤</span> in Switzerland |
Include Weather Icons in your app: https://github.com/erikflowers/weather-icons
Include the below JSON in your application, for example purposes, lets assume it's a global named weatherIcons
.
Make a request to OpenWeatherMap:
req = $.getJSON('http://api.openweathermap.org/data/2.5/weather?q=London,uk&callback=?');
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps