Skip to content

Instantly share code, notes, and snippets.

@GabyL
GabyL / index.html
Last active August 29, 2015 14:16 — forked from mayfer/index.html
<!doctype>
<html>
<head>
<title>hi</title>
<style>
body, html {
background: #aaa;
font-family: monospace;
@GabyL
GabyL / notes.md
Last active August 29, 2015 14:15 — forked from monicao/notes.md

Setting up the Ruby dev environment on Mavericks

... should work on Yosemite as well. Add a comment here if you find any problems.

Why would I want to do that?

  • You want to run guard
  • You want use Sublime plugins (like RSpec or Guard plugins)

1. Installing brew

@GabyL
GabyL / index.html.erb
Last active August 29, 2015 14:15 — forked from mayfer/index.html.erb
<script src="//embed.flowplayer.org/5.5.2/embed.min.js">
<div class="flowplayer" style="width: 624px; height: 400px;">
<video>
<source type="video/mp4" src="/data/mp4.mp4">
</video>
</div>
</script>
File Permissions
1 2 3
- --- --- ---
d rwx rwx rwx
r: Read
w: Write
x: Execute (execute file as a program, or execute directory meaning see contents of directory)
class FilesController < ApplicationController
def index
end
def upload
upload = params[:babyfile]
name = upload.original_filename
directory = "public/data"
# create the file path
@GabyL
GabyL / index.html
Last active August 29, 2015 14:15 — forked from mayfer/index.html
<html>
<head>
<style>
body { background: #358; color: #fff; padding: 50px; font-family: sans-serif; }
a { color: #fff; font-size: 40px; }
section {
width: 800px;
margin: 0px auto;
}
@GabyL
GabyL / index.html
Last active August 29, 2015 14:15 — forked from mayfer/index.html
<html>
<head>
<style>
body { background: #358; color: #fff; padding: 50px; font-family: sans-serif; }
</style>
</head>
<body>
<script>
@GabyL
GabyL / urls.txt
Last active August 29, 2015 14:14 — forked from mayfer/urls.txt
Hate mail website
=====================
GET / -> all hate mails (10 per page)
# pagination, two options...
GET /?page=:page_num -> get particular page
GET /page/:page_num/ -> get particular page

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@GabyL
GabyL / 0_reuse_code.js
Last active August 29, 2015 14:12
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