Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Elephant Gallery</title>
</head>
<body>
<div class="section" id="gallery">
<h1>Pictures of elephants</h1>
<img class="gallery-thumb" id="pic1" src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Loxodonta_africana_-_old_bull_(Ngorongoro,_2009).jpg">
<img class="gallery-thumb" id="pic2" src="https://upload.wikimedia.org/wikipedia/commons/6/63/African_elephant_warning_raised_trunk.jpg">
<!DOCTYPE html>
<html>
<head>
<title>My Portfolio</title>
</head>
<body>
<h1>My Portfolio</h1>
<ul>
<li>
<h2>Elephant Gallery!</h2>
<!DOCTYPE html>
<html>
<head>
<title>jQuery Fun House Starter Code</title>
</head>
<body>
<div class="section">
<h1>What is your name?
<input id="name">
</h1>
@courajs
courajs / controllers.application.js
Created November 23, 2016 23:37
Named yields-ish
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@courajs
courajs / components.swap-order.js
Created November 23, 2016 23:34
yield inverse
import Ember from 'ember';
export default Ember.Component.extend({
});
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>Saving this website</p>
</body>
</html>
@courajs
courajs / bodyString.js
Created September 12, 2016 18:24
Some evil...
Function.prototype.bodyString = function bodyString(){
var s = this.toString();
return s.substring(s.indexOf('\n'), s.lastIndexOf('\n'));
}
console.log(function(){/*
hey
indented
\n\\\///* $pecial ch&rs
*/}.bodyString());
/*
It is not the critic who counts; not the man who points out how the
strong man stumbles, or where the doer of deeds could have done them
better. The credit belongs to the man who is actually in the arena,
whose face is marred by dust and sweat and blood; who strives valiantly;
who errs, who comes short again and again, because there is no effort
without error and shortcoming; but who does actually strive to do the
deeds; who knows great enthusiasms, the great devotions; who spends
himself in a worthy cause; who at the best knows in the end the triumph
@courajs
courajs / application.controller.js
Created March 24, 2016 15:38
Using computed.or incorrectly
import Ember from 'ember';
const {
computed: { or }
} = Ember;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
thing: or('someKey', 'this is wrong')
});
@courajs
courajs / application.controller.js
Last active May 24, 2018 17:29
Component Subexpressions one-way by default?
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
val1: 8,
val2: 8
});