Skip to content

Instantly share code, notes, and snippets.

@vcolavin
vcolavin / markup_guide.md
Last active July 16, 2018 23:28
A cheatsheet for Periscopic's content authors writing Markdown

Author guide for Article and Project body copy

Click the "raw" button at the top-right of this box to see the unrendered (aka "raw") version of this guide. Some of this guide will only make sense if you also see the "raw" view, so try and view these side by side.

You may also find it helpful to look at the Example Project.

For the most part, you'll be using Markdown. It provides a nice syntax for things like headers, bulleted lists, and links.

Markdown is not a "What You See Is What You Get" format. Because of this, I recommend that you write your post in a markdown editor, then paste it into the body field of the Project or Article. It will make your life easier.

To anyone working on .Net environments, if you encounter build errors referencing FV.Logger and not being able to find version 1.0.0.0, you may need to set up your NuGet to find our in house repo. To do so from VS

  • go to Tools>NuGet Package Manager> Manage NuGet Packages for Solution.
  • In the upper right area of the dialog that opens will be the words 'Package source:' followed by a drop down and a gear icon.
  • Expand the dropdown and look for 'CommonSource'. If it exists, you don't need to do anything.
  • If it does not, click the gear icon to open the Options panel.
  • From here click the green plus sign ( + ) in the upper right to add a generic package source to the list.
  • Next move the cursor to the Source: text box, which currently displays http://packagesource.
  • Set URL to \\usjenkins01\Jenkins\CommonSource and set name to CommonSource, then click Update, followed by OK to close the Options menu.
  • Finally, if an option to Restore Packages is currently visible from the NuGet
class Wolf < AR::Base
module Movable
include GeneralMovingMethods
# here would be specifics about wolves moving
end
end
class Rabbit < AR::Base
module Movable
include GeneralMovingMethods
class Wolf < AR::Base
include Movable
end
module Movable
def some_movement_method
# like maybe accessors for Location relation
end
end
@vcolavin
vcolavin / ruby.rb
Created July 18, 2016 05:17
Example using modules within modules to create private namespaces
module MyFirstModule
def first_public_method(my_string)
return "#{my_string} #{PrivateMethods.private_method}"
end
module PrivateMethods
def self.private_method
1
end
end
@vcolavin
vcolavin / gist:05e31cae2a49051646f11fccfa0d410c
Last active July 18, 2016 04:44
Ruby modules displaying inexplicit dependencies
module MyFirstModule
def first_public_method(my_string)
second_public_method(my_string)
end
end
module MySecondModule
def second_public_method(my_string)
return "#{my_string} 1"
end
@vcolavin
vcolavin / module_test.rb
Last active July 17, 2016 23:29
Example of private module methods overwriting each other when mixed in
module MyFirstModule
def first_public_method(my_string)
return "#{my_string} #{private_method}"
end
private
def private_method
1
end
end
@vcolavin
vcolavin / module_test.rb
Last active July 17, 2016 23:29
Example of ruby modules using classes to create truly private methods.
module MyFirstModule
def first_public_method(my_string)
blah = PrivateMethods.new
return "#{my_string} #{blah.private_method}"
end
class PrivateMethods
def private_method
1