Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html ng-app>
<head>
<meta name="description" content="Click example" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<meta charset=utf-8 />
<!DOCTYPE html>
<html ng-app>
<head>
<meta name="description" content="Repeat example" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script>
<meta charset=utf-8 />
<!DOCTYPE html>
<html ng-app>
<head>
<meta name="description" content="Controller example" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script>
<meta charset=utf-8 />
<!DOCTYPE html>
<html ng-app>
<head>
<meta name="description" content="Hello Angular" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script>
<meta charset=utf-8 />
var myNamespace = (function () {
var myPrivateVar, myPrivateMethod;
// A private counter variable
myPrivateVar = 0;
// A private function which logs any arguments
myPrivateMethod = function( foo ) {
console.log( foo );
@tihuan
tihuan / original.rb
Last active August 29, 2015 14:01
Rails - Using Partials
<div class="part">
>>>I'm a partial<<<
</div>
<ol>
<div class="url">
<li><%= link_to url.short_url, "http://#{url.url}" %> - <%="#{url.url}"%></li>
</div>
</ol>
<div class="part">
>>>I'm a partial<<<
@tihuan
tihuan / 0_reuse_code.js
Created April 17, 2014 16:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
1 cd Desktop
2 git clone https://github.com/tihuan/CLI-Obstacle-Course.git
3 cd CLI-Obstacle-Course
4 ls
5 ls -a -time -l
6 mv images app/assets
7 cd app/views/static_pages
8 ls
9 ls ../
10 ls ../../
@tihuan
tihuan / 0.2.1-boggle_class_from_methods.rb
Last active August 29, 2015 13:55 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1boggle class challenge
class BoggleBoard
attr_reader :board
def initialize(board)
@board = board
end
def create_word(*coords)
coords.map {|coord| board[coord.first][coord.last]}.join("")
end