Current as at 18-MAR-2014
#Command Line Crash Course
##Command Listing
- pwd - print working directory
- hostname - my computer's network name
- mkdir - make directory
- cd - change directory
- ls - list directory
Current as at 18-MAR-2014
#Command Line Crash Course
##Command Listing
Current as at 25-Feb-2014
#Ruby Notes
###Terminology
Literals = values e.g. 1
or "Simon"
Variables = a place to store values
Operator = + - * / % =
Parameter = inputs for variables
Fix_num = an integer
Current as at 18-MAR-2014
#Rails Notes
###HTTP Requests###
Contains… GET
PAPER - work out what form all of your data will take- tables and field names
TERMINAL - rails new NAME -d postgresql
TERMINAL - cd into that NAME folder and subl .
SUBL - open your gemfile and add all the extra gems you want
TERMINAL - bundle
#Make sure the postgres App is running on computer | |
#Carrierwave works with ORM such as Active Record and Datamapper; | |
rails new carrier_wave_app -d postgresql | |
add production and development database to database.yml #make sure you do not add one of the fields to production | |
rails g scaffold art_galleries name:string location:string avatar:text #Also create the table in migrations folder; | |
#Is it added to the protected attributes method in the controller; | |
#Add root_to in the config.routes; | |
gem 'carrierwave' | |
rails generate uploader Avatar #Give you a class in app/uploaders/avatar_uploader.rb | |
rails g migration add_avatar_to_art_galleries avatar:string |
#Snippet Instructions...
##Create a new Snippet
Tools > New Snippet...
Put your code in here (don't delete the cdata tags)...
I hereby claim:
To claim this, I am signing this object:
import time | |
import requests | |
import json | |
class DownloadStationAPI(): | |
def __init__(self, host=None, username=None, password=None): | |
self.name = 'DownloadStation' |
The largest issue I have with Rrule is that it has no real timezone support. Dates are always generated based off the timezone of your machine/server. I want the same functionality but with the ability to specify what timezone the resulting dates should be in.
I also wanted to see if it was possible to make a much more lightweight library. For the most part moment-timezone
already handles the complex logic of adding months, weeks, days to a date, so why not leverage that for date logic?
const result = await someAsyncThing(); |