This file contains hidden or 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 historySupport() { | |
| return !!(window.history && window.history.pushState !== undefined); | |
| } | |
| function pushPageState(state, title, href) { | |
| if (historySupport()) { | |
| history.pushState(state, title, href); | |
| } | |
| } |
This file contains hidden or 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
| <link rel="import" href="../core-scaffold/core-scaffold.html"> | |
| <link rel="import" href="../core-header-panel/core-header-panel.html"> | |
| <link rel="import" href="../core-menu/core-menu.html"> | |
| <link rel="import" href="../core-item/core-item.html"> | |
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <link rel="import" href="../core-toolbar/core-toolbar.html"> | |
| <link rel="import" href="../core-menu/core-submenu.html"> | |
| <polymer-element name="my-element"> |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" | |
| xmlns:tei="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="#all"> | |
| <xsl:output method="xml" indent="yes"/> | |
| <!-- Copy everything unless matched by another template --> | |
| <xsl:template match="@*|node()|comment() " priority="-1"> | |
| <xsl:copy> | |
| <xsl:apply-templates select="@*|node()|comment()"/> |
This file contains hidden or 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
| # Problem: doing a .joins(:user) when using mySQL returns an empty array even when signups exist. The reason I am doing a joins is so that I can sort by user name. | |
| ### works in SQLlite ### | |
| >>> o.signups.joins(:user).order('users.first_name ASC') | |
| Signup Load (1.3ms) SELECT "signups".* FROM "signups" INNER JOIN "users" ON "users"."id" = "signups"."user_id" WHERE "signups"."occurrence_id" = 8 ORDER BY users.first_name ASC | |
| => [#<Signups ...>] | |
This file contains hidden or 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
| /********* jquery.embedforms.js *********** | |
| * | |
| * Author: Ryan Hall - Biola University, IT | |
| * Date Updated: July 15, 2015 | |
| * | |
| * This is a jQuery plugin that allows you to list forms from forms.biola.edu on your own website. | |
| * The forms API automatically filters forms by user permissions. | |
| * | |
| * To use: | |
| * $('#selector').embedForms(); |
This file contains hidden or 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
| :set tabstop=2 | |
| :set expandtab | |
| :set shiftwidth=2 | |
| :set autoindent | |
| :set number | |
| :set whichwrap+=<,>,h,l,[,] |
This file contains hidden or 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 bash | |
| apt-get -y update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev libreadline-gplv2-dev libtool vim | |
| cd /tmp | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz | |
| tar -xvzf ruby-1.9.3-p327.tar.gz | |
| cd ruby-1.9.3-p327/ | |
| ./configure --prefix=/usr/local | |
| make |
This file contains hidden or 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 'dropbox_sdk' # gem install dropbox-sdk | |
| require 'fileutils' | |
| require 'thread' | |
| # Example: downloads entire dropbox | |
| # DropboxDump.new('your_access_token', '/download/destination').download("/") | |
| class DropboxDump | |
| attr_accessor :client, :dest, :work_q, :worker_count | |
| def initialize(access_token, dest, max_workers = 3) |
This file contains hidden or 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, anythign you put here won't be evaluated --> | |
| <!doctype html> | |
| <!-- this must be the very first thing in your HTML document (comments don't count). | |
| This declaration tells the web browser what kind of document to expect. | |
| You can see a list of compatible doctypes here http://www.w3schools.com/tags/tag_doctype.asp | |
| For our purposes, we will always be using the above syntax. --> | |
| <html> | |
| <!-- This is the first tag in this document. It is the only one of it's kind and it's sole purpose is to wrap the entire document --> |
This file contains hidden or 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
| bundle exec rake db:reset db:migrate db:test:prepare db:seed | |
| # This will reset your database and reload your current schema. | |
| ### OR ### | |
| bundle exec rake db:drop db:create db:migrate db:test:prepare db:seed | |
| # This will destroy your db, recreate it, and then migrate your current schema. |
OlderNewer