This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is a comment | |
# | |
# "mkdir ~/bin" makes a "bin" folder in your home folder. this is a good place to put your own programs | |
# "rm ~/bin/subl" removes any "subl" command that you might already have | |
# 'ln -s "/Appli...."' links "subl" to the app in your Applications folder | |
# cut and paste these commands into your terminal shell: | |
mkdir ~/bin | |
rm ~/bin/subl | |
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | |
<style> | |
body { | |
font-family: "Open Sans", sans-serif; | |
} | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>JavaScript & jQuery Example</title> | |
<!-- | |
We put the styles here just to keep the assignment all in one file. | |
Normally they go in separate files. | |
--> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v/zxkcmv/zxclmv/.zxc,vm/xzc.,vm/xzcv,mxzc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'data_mapper' | |
DataMapper.setup(:default, "sqlite3://#{settings.root}/dictionary.sqlite3") | |
set :port, 4000 | |
set :bind, '0.0.0.0' | |
class Entry | |
include DataMapper::Resource | |
property :id, Serial | |
property :word, String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' # simple web framework | |
require 'data_mapper' # metagem, requires common plugins too. | |
# need to install dm-sqlite-adapter | |
DataMapper.setup(:default, "sqlite3://#{settings.root}/dictionary.sqlite3") | |
set :port, 4000 # port and binding set for Nitrous.io debugging | |
set :bind, '0.0.0.0' | |
# You don't have to define the instance variables, DataMapper does that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sample/sample_app.rb | |
require 'sinatra' | |
require 'pry' | |
# We us "classic" mode where you don't actually see the class | |
# inheriting from Sinatra::Base and you don't start the app with | |
# rackup. This makes the object structure less obvious but lets | |
# Sinatra do more of the behind-the-scenes |
NewerOlder