A Dashing widget for displaying the number of current visitors (in real time) to your website, as reported by Google Analytics.
This widget is a fork of https://gist.github.com/mtowers/5986576
| class Ticket < ActiveRecord::Base | |
| belongs_to :grouper | |
| belongs_to :user | |
| validate :user_cant_be_blacklisted, on: :confirmation | |
| validate :user_cant_double_book, on: :confirmation | |
| validate :grouper_cant_be_full, on: :confirmation | |
| validate :grouper_cant_have_occurred, on: :confirmation |
A Dashing widget for displaying the number of current visitors (in real time) to your website, as reported by Google Analytics.
This widget is a fork of https://gist.github.com/mtowers/5986576
| package main | |
| import ( | |
| "encoding/json" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) | |
| type Message struct { |
rake db:test:prepare will also clear the test database.Weatheroutlook Dashing Widget displays a 5-days weather outlook from Yahoo! Weather using Climacons Font.
The difference between XYZ and TMS tiles and how to convert between them
Lots of tile-based maps use either the XYZ or TMS scheme. These are the maps that have tiles
ending in /0/0/0.png or something. Sometimes if it's a script, it'll look like
&z=0&y=0&x=0 instead. Anyway, these are usually maps in Spherical Mercator.
Good examples are OpenStreetMap, Google Maps, MapBox, MapQuest, etc. Lots of maps.
Most of those are in XYZ. The best documentation for that is slippy map tilenames on the OSM Wiki, and Klokan's Tiles a la Google.
| require 'io/console' | |
| # Reads keypresses from the user including 2 and 3 escape character sequences. | |
| def read_char | |
| STDIN.echo = false | |
| STDIN.raw! | |
| input = STDIN.getc.chr | |
| if input == "\e" then | |
| input << STDIN.read_nonblock(3) rescue nil |
| require 'net/ftp' | |
| CONTENT_SERVER_DOMAIN_NAME = "one-of-the-ftp-server.thought-sauce.com.hk" | |
| CONTENT_SERVER_FTP_LOGIN = "saucy-ftp-server-login" | |
| CONTENT_SERVER_FTP_PASSWORD = "saucy-ftp-server-password" | |
| # LOGIN and LIST available files at default home directory | |
| Net::FTP.open(CONTENT_SERVER_DOMAIN_NAME, CONTENT_SERVER_FTP_LOGIN, CONTENT_SERVER_FTP_PASSWORD) do |ftp| | |
| files = ftp.list |