Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="assetListItem">
@AllenSH12
AllenSH12 / Room_Backbone.js
Last active August 29, 2015 13:56
Marionette View Swapping Test
define(function (require) {
'use strict';
var Room_Underscore = _.template(require('text!templates/room.html')),
Room_HBS = require('hbs!templates/room'),
Room_Jade = require('jade!templates/room');
return Backbone.View.extend({
id: 'content',
render: function () {
this.$el.append(Room_Underscore(this.model.attributes));
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<meta charset="utf-8">
<meta name="description" content="a scrollable list of items with a fixed height header">
<title>JS Bin</title>
</head>
<body>
<div id="courseNavModule">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="left col">
<div class="header row">
<ul class="list-group" id="courseNavHeader">
//1
val n = 10
val range = 0 until n
var a = new Array[Int](n)
for (i <- 0 until n) a(i) = range(rnd.nextInt(range.length))
//2
var a = Array(1, 2, 3, 4, 5)
THE CALIFORNIAN, Saturday, November 11, 1865
EXIT "BUMMER." - As we have devoted but little space to an event which has filled our local contemporaries with as much sorrow (judging from the columns of lamentations it has called forth) as would the decease of the best biped in the city, we give "Mark Twain's" view of the occurrence as recorded in the ENTERPRISE of the 8th. Strangely enough, Mark, who can't stand "ballad infliction" seems to think there has not been quite enough of "Bummer":
"The old vagrant 'Bummer' is really dead at last; and although he was always more respected than his obsequious vassal, the dog 'Lazarus,' his exit has not made half as much stir in the newspaper world as signalised the departure of the latter. I think it is because he died a natural death: died with friends around him to smooth his pillow and wipe the death-damps from his brow, and receive his last words of love and resignation; because he died full of years, and honor, and disease, and fleas. He was permited to die a na
// 1
class Counter {
private var value: Int = 0
def increment() { value += 1 }
}
// 2
class BankAccount {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var a, cocktail_sort, t;
@AllenSH12
AllenSH12 / screenshot_shadow
Created December 6, 2014 23:32
OS X screenshot drop shadow
# to turn off
defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer
# to turn on
defaults write com.apple.screencapture disable-shadow -bool false
killall SystemUIServer
@AllenSH12
AllenSH12 / index.html
Created July 3, 2018 18:27
option element value
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<select name="foobar" id="testSelect">