This file contains 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 Parent(data) { | |
// Let constructor work or without new. | |
// http://ejohn.org/blog/simple-class-instantiation/ | |
// This makes it easier to use _.map below. | |
if (!(this instanceof Parent)) { | |
return new Parent(data); | |
} | |
// Use JSON data passed in, or set defaults values. |
This file contains 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 'net/http' | |
names=%w{ ututtza publicstaticmainvoid netscrape getus } | |
on_off = {0=>"OFFline", 1=>"ONline"} #hash for when printing out if online | |
names.each do |name| | |
uri = URI("http://census.soe.com/xml/get/ps2-beta/character/?name.first_lower=#{name}&c:show=name,online_status%20&c:resolve=online_status") #using planetside 2 API to get character information just need online_status value | |
status= Net::HTTP.get(uri) | |
first_junk=status.split #initial split of string to get online or offline | |
onlinestatus=first_junk.at(9).split('"') #second split which returns 0 when offline and 10 when online in the (1) index of the array |
This file contains 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 'net/http' | |
require 'json' | |
names=%w{ ututtza publicstaticmainvoid netscrape getus } | |
# Use a different method of string interpolation/templating. | |
# This way I can define the URL template once here, and then insert different | |
# names into it later. | |
# See: http://www.ruby-doc.org/core-1.9.3/String.html#method-i-25 | |
uri_template = "http://census.soe.com/json/get/ps2-beta/character/?name.first_lower=%{name}&c:show=name,online_status%%20&c:resolve=online_status" |
This file contains 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 'net/http' | |
require 'json' | |
# Q: | |
# I kind of understand how this works. Each class is like a user made method | |
# (or function as I would call it). So whenever you call the player class it | |
# will run the parameters through. I read something about you can use that to | |
# make it more manageable. And you can mage gems out of it (or something - not | |
# quite sure on that part). |
This file contains 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
# The Roots theme by default does not check production assets into Git, so | |
# they are not deployed by Capistrano when using the Bedrock stack. The | |
# following will compile and deploy those assets. Copy this to the bottom of | |
# your config/deploy.rb file. | |
# Based on information from this thread: | |
# http://discourse.roots.io/t/capistrano-run-grunt-locally-and-upload-files/2062/7 | |
# and specifically this gist from christhesoul: | |
# https://gist.github.com/christhesoul/3c38053971a7b786eff2 |
This file contains 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
// | |
// Bootstrap Grid Child Columns | |
// See: http://nateroling.com/2014/11/25/aligning-nested-grids/ | |
// -------------------------------------------------- | |
.make-xs-child-column(@columns; @parent-columns; @gutter: @grid-gutter-width) { | |
.make-sm-column(@columns, @gutter); | |
width: percentage((@columns / @parent-columns)); | |
} | |
.make-xs-child-column-offset(@columns; @parent-columns) { |
This file contains 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
// http://stackoverflow.com/questions/6654958/make-body-have-100-of-the-browser-height | |
html { height: 100%; } | |
body { min-height: 100%; } | |
// http://www.paulirish.com/2012/box-sizing-border-box-ftw/ | |
html { box-sizing: border-box; } | |
*, *:before, *:after { box-sizing: inherit; } | |
// http://alistapart.com/article/axiomatic-css-and-lobotomized-owls | |
* { margin: 0; padding: 0; } |
This file contains 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
Blogs | |
http://www.smashingmagazine.com | |
http://alistapart.com | |
http://uxmovement.com | |
https://uxmag.com | |
http://www.lukew.com/ff/ | |
https://css-tricks.com | |
Schools |
This file contains 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
#!/bin/bash | |
# | |
# Example: | |
# > just publish | |
# Finds and executes scripts/publish or script/publish | |
# TODO Find and execute grunt/gulp tasks | |
CMD='' | |
if [ -x ./scripts/$1 ]; then |
This file contains 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
timestamp = 1479761724 | |
timestamplong = 1479761724389 | |
millisecond = 389 | |
dayseconds = 53724 | |
time = 2:55pm |
OlderNewer