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 List | |
| constructor:()-> | |
| @dataStore=[] | |
| @pos=0 | |
| @listSize = 0 | |
| length:()-> | |
| @listSize | |
| clear:()-> | |
| @dataStore = [] | |
| @listSize = @pos = 0 |
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 Stack | |
| constructor:()-> | |
| @dataStore = [] | |
| @top = 0 | |
| push:(element)-> | |
| @dataStore[++@top] = element | |
| pop:()-> | |
| @dataStore[--@top] | |
| peek:()-> | |
| @dataStore[@top-1] |
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 Queue | |
| constructor:()-> | |
| @dataStore = [] | |
| enqueue:(element)-> | |
| @dataStore.push(element) | |
| dequeue:(element)-> | |
| @dataStore.shift() | |
| front:()-> | |
| @dataStore[0] | |
| back:()-> |
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
| /*** | |
| * Handles uploading an image to a specified url | |
| */ | |
| class ImageUploaderTask extends AsyncTask<Void, Void, Boolean> { | |
| private String mUrl; | |
| public ImageUploaderTask(String url) { | |
| mUrl = url; | |
| } | |
| @Override |
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
| # /db/migrate/20140119134739_add_hstore.rb | |
| class AddHstore < ActiveRecord::Migration | |
| def up | |
| enable_extension 'hstore' | |
| end | |
| def down | |
| disable_extension 'hstore' | |
| end | |
| 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
| # Vagrantfile | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "precise32" | |
| config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
| config.vm.network :forwarded_port, guest: 80, host: 8888 | |
| 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
| # File Cheffile | |
| #!/usr/bin/env ruby | |
| #^syntax detection | |
| site 'http://community.opscode.com/api/v1' | |
| cookbook 'apt' | |
| cookbook 'php' | |
| cookbook 'apache2' |
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 'twitter' | |
| require 'unirest' | |
| client = Twitter::REST::Client.new do |config| | |
| config.consumer_key = "CONSUMER KEY" | |
| config.consumer_secret = "CONSUMER SECRET" | |
| config.access_token_secret = "ACCESS TOKEN SECRET" | |
| config.access_token = "ACCESS TOKEN" | |
| 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
| FallbackResource /index.php |
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
| FROM nginx | |
| RUN rm /etc/nginx/conf.d/default.conf | |
| COPY default.conf /etc/nginx/conf.d/default.conf | |
| EXPOSE 80 | |
| CMD ["nginx", "-g", "daemon off;"] |
OlderNewer