Skip to content

Instantly share code, notes, and snippets.

@etsai
etsai / application.js
Created December 14, 2013 06:42
This is a little racing game created with Javascript and HTML.
$(document).ready(function() {
var end_of_track = 15;
var players = [
{
id: 1,
position: 0,
keycode: 80,
css_locator: '#player1_strip'
},
{
@etsai
etsai / live_demo.rb
Last active January 4, 2016 21:39
Basic script of the Twilio Live Demo to introduce Twilio's API
#Add Ruby Library
require "twilio-ruby"
#Connect to my account
@client = Twilio::REST::Client.new 'AccountSid', 'AuthToken'
#Assiging that object so it easier to access my Account
@account = @client.account
#Get a list of all available US phone numbers
@etsai
etsai / README.md
Created November 4, 2013 23:37 — forked from JoelBesada/README.md

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@etsai
etsai / form-validator.js
Last active December 22, 2015 09:39 — forked from ksolo/form-validator.js
Form Validation
$(function(){
$("form").submit(function(event) {
event.preventDefault();
$("ul").empty();
var email = $("input:first").val()
var password = $("input:last").val()
var valid_email = /\w+@\w+.\w/
var char_length = /.{8,}/
var digit = /\d+/
@etsai
etsai / index.html
Last active December 22, 2015 03:19 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
@etsai
etsai / SMS Keyword
Created September 10, 2012 21:55
Keyword functionality example
<?php
/**
* Include twilio-php, the official Twilio PHP Helper Library, which can be found at
* http://www.twilio.com/docs/libraries
*/
include('Services/Twilio.php');
/* ## Controller ## */
function index(){
@etsai
etsai / story_presenter_error
Created January 25, 2012 20:05
Story Presenter
Elaines-MacBook-Air:madlib elainetsai$ git pull github ruby_version
From github.com:etsai/madlib
* branch ruby_version -> FETCH_HEAD
Auto-merging views/story_presenter.rb
CONFLICT (content): Merge conflict in views/story_presenter.rb
Automatic merge failed; fix conflicts and then commit the result.
class StoryPresenter
attr_reader :story