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
document.addEventListener('DOMContentLoaded', init, false) | |
var videoId = document.getElementById('video') | |
//var videoTitle = videoId.getAttribute('data-description') | |
var videoTitle = '宝宝身边有怪物' | |
function init () { | |
videoId.addEventListener('ended', videoEnd, false) | |
videoId.addEventListener('timeupdate', videoTimeUpdate, false) | |
videoId.addEventListener('play', videoPlay, false) |
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
function fnValidate() | |
{ | |
var aFields = | |
{"First Name":"sFirst", | |
"Last Name":"sLast", | |
"DRI Affiliation":"sAffil1", | |
"DRI Email":"sEmail_DRI"}; | |
var bValid = true; | |
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
# SnipMate is required to use snippets | |
# Download SnipMate: http://www.vim.org/scripts/script.php?script_id=2540 | |
# Put this file in ~/.vim/snippets/ then restart vim | |
# This snippet file includes many useful snippets for CodeIgniter. Please feel free to fork and contribute! | |
snippet php | |
<?php | |
${1} | |
?> | |
snippet ec | |
echo "${1:string}"${2}; |
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
- simple | |
- public over private | |
- personal vanity | |
- internet is global | |
- permalinks | |
- one important item per page | |
- don't break the browser | |
- don't wanker in technology | |
- a medium is not a grande | |
- break convention for your users |
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
CREATE TABLE `user` ( | |
`twitter_id` int(10) unsigned NOT NULL, | |
`created_at` timestamp NOT NULL default '0000-00-00 00:00:00', | |
`name` varchar(80) NOT NULL, | |
`screen_name` varchar(30) NOT NULL, | |
`location` varchar(120) default NULL, | |
`description` varchar(640) default NULL, | |
`profile_image_url` varchar(400) NOT NULL, | |
`url` varchar(100) default NULL, |
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
#!/usr/bin/env ruby | |
# twail.rb | |
# Twitter stream tail | |
# Copyright 2010 Jonathan Rudenberg | |
# Licensed under the MIT License | |
# | |
# Prerequisites: gem install json twitter-stream | |
require 'optparse' |
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
.block { display: block; } | |
.inline { display: inline; } | |
.clrfix { display:inline-block; } | |
.hide { display: none; } | |
.fleft { float: left; } | |
.fright { float: right; } | |
.fclear { clear: both; } | |
.hi { background-color: rgb(255, 255, 204); } | |
.sub { vertical-align: sub; } | |
.super { vertical-align: super; } |
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 'rubygems' | |
require 'gattica' | |
class ExtractKeywords | |
def initialize(email,password) | |
@gs = Gattica.new(email,password) | |
end | |
def get_accounts | |
results = [] | |
@gs.accounts.each{|account| |