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
| module SimpleUtil | |
| # Simple class to show status via stdout on really long rake tasks | |
| class Spinner | |
| attr_accessor :position | |
| def initialize | |
| @position = 0 | |
| @status_marker = ['|', '/', '-', '\\'] | |
| $stdout.sync = true | |
| end |
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
| class window.EntryDate | |
| @entryDate: null | |
| @startTime: null | |
| constructor:(entryDate) -> | |
| @entryDate = +new Date() / 1000 unless entryDate? | |
| @startTime = entryDate | |
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
| #import <Foundation/Foundation.h> | |
| int main(int argc, const char * argv[]) { | |
| @autoreleasepool { | |
| NSMutableArray *items = [[NSMutableArray alloc] init]; | |
| [items addObject:@"One"]; | |
| [items addObject:@"Two"]; | |
| [items addObject:@"Three"]; | |
| [items addObject:@"Four"]; |
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
| " Use Vim settings, rather then Vi settings. This setting must be as early as | |
| " possible, as it has side effects. | |
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') |
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
| _ended: (vote_flag, hasVotedCookie) -> | |
| @ended = true | |
| $.modal $("#inter"), | |
| close: false | |
| maxHeight: 300 | |
| onClose: => @_endItAll() | |
| $('.countdown').countdown | |
| until: +5 | |
| format: 'S' |
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
| # Wanted to do this just with stdlib and do it in a firehose | |
| # type fashion | |
| # Could have used their bigdata interface but hey | |
| # | |
| # A lot more that could be done, validation of input dates, retry queue, | |
| # logging etc... | |
| require 'date' | |
| require 'open-uri' | |
| require 'zlib' |
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
| class Publisher::CommunityUsersTable < TableCloth::Base | |
| presenter SortableTablePresenter | |
| column :username_in_table, label: "Username" | |
| column :auth_provider_decorated, label: "Auth", sort_by: :provider | |
| column :email_decorated, label: "Email", sort_by: :email | |
| column :user_since, label: "User Since", sort_by: :created_at | |
| column :latest_activity, label: "Latest Activity", sort_by: :last_sign_in_at | |
| column :karma, label: "Rank", sort_by: :karma | |
| column :number_of_submissions, label: "Submissions" |
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
| class App.Screen.Views.ScreensView extends Backbone.View | |
| initialize: -> | |
| @sv = App.Screen.Views.ScreenView | |
| @collection.on "add", @addOne, @ | |
| @collection.on "reset", @addAll, @ | |
| addOne: (screenItem) -> | |
| screenView = new @sv({model: screenItem}) | |
| @$el.append(screenView.render().el) | |
| #good here |
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
| <!DOCTYPE html> | |
| 1 <html> | |
| 2 <head> | |
| 3 <meta charset="utf-8"> | |
| 4 <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script> | |
| 5 <body> | |
| 6 <input type="file" accept="/*" capture="camera"/> | |
| 7 <script> | |
| 8 var input = document.querySelector('input[type=file]'); | |
| 9 |
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
| videojs @$("video")[0], { | |
| 1 techOrder: ["html5", "flash"] | |
| 2 preload: "auto" | |
| 3 }, () -> | |
| 4 @videoPlayer = @ | |
| 5 console.log "VID PLAYER" | |
| 6 console.log @videoPlayer | |
| 7 | |
| 8 SQ.Widget.Application.hideLoader() | |
| 9 |