Heroku is a simple way to publish your Rails app, and a powerful platform that will allow it to scale. In this episode, Jay McGavren gets you started with your first Heroku app.
- You WANT Rails to fail locally if a gem isn't in your Gemfile
| // See comments below. | |
| // This code sample and justification brought to you by | |
| // Isaac Z. Schlueter, aka isaacs | |
| // standard style | |
| var a = "ape", | |
| b = "bat", | |
| c = "cat", | |
| d = "dog", |
| From: Chris DeSalvo <chris.desalvo@voxer.com> | |
| Subject: Why we can't process Emoji anymore | |
| Date: Thu, 12 Jan 2012 18:49:20 -0800 | |
| Message-Id: <AE459007-DF2E-4E41-B7A4-FA5C2A83025F@voxer.com> | |
| --Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B | |
| Content-Transfer-Encoding: quoted-printable | |
| Content-Type: text/plain; | |
| charset=utf-8 |
| # Do you like python named parameters (kvargs) ? | |
| # Well, you can have it in bash too!! | |
| $ function myfunc() { local $*; echo "foo=$foo, bar=$bar"; } | |
| $ myfunc bar=world foo=hello | |
| foo=hello, bar=world |
Heroku is a simple way to publish your Rails app, and a powerful platform that will allow it to scale. In this episode, Jay McGavren gets you started with your first Heroku app.
| Enter into wolfram alpha to draw | |
| witch of Agnesi | |
| ampersand curve | |
| Archimedean spiral | |
| Archimedes' spiral | |
| astroid | |
| astroid pedal curve | |
| atriphtaloid | |
| bean curve |
| <style> | |
| /* IMPORTANT - must give map div height */ | |
| #map-canvas { | |
| height:400px; | |
| } | |
| /* IMPORTANT - fixes webkit infoWindow rendering */ | |
| #map-canvas img { | |
| max-width: none; | |
| } |
| """ | |
| Simple algorithm to download all the egghead.io videos in highest-quality from YouTube. | |
| Run from the directory you want the videos to appear. Renames them so that they have the video number + omit the repetitive "Egghead.io - AngularJS -" text. | |
| Installing dependency: | |
| $ pip install git+https://github.com/NFicano/pytube#egg=pytube | |
| """ | |
| from pytube import YouTube #, exceptions as YTD_exceptions |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| var myApp = angular.module('myApp', []); | |
| myApp.directive('googleplace', function() { | |
| return { | |
| require: 'ngModel', | |
| link: function(scope, element, attrs, model) { | |
| var options = { | |
| types: [], | |
| componentRestrictions: {} | |
| }; |
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |