Skip to content

Instantly share code, notes, and snippets.

View rymawby's full-sized avatar

Ry Mawby rymawby

View GitHub Profile
@rymawby
rymawby / pr-comment-styles.txt
Created April 12, 2016 13:32
PR comment styles for GitLab closing tickets
Refs #{ticket}: {description}
Closes: #{ticket}: {description}
Fix #{ticket}: {description}
@rymawby
rymawby / alpha_transparency.md
Created March 1, 2016 15:48
Alpha transparency as hex

100% — FF 95% — F2 90% — E6 85% — D9 80% — CC 75% — BF 70% — B3 65% — A6 60% — 99 55% — 8C

@rymawby
rymawby / .atom-build.json
Created January 26, 2016 12:54
Building a Brightscript project using atom build
{
"cmd": "make install",
"name": "Roku Build",
"sh": true,
"cwd": "{PROJECT_PATH}",
"env": {
"ROKU_DEV_TARGET": "192.168.2.30"
},
"errorMatch": [
"^regexp1$",
@rymawby
rymawby / padawan-to-jedi-interface-segregation-principle.md
Last active February 4, 2016 11:48
Padawan to Jedi: Interface segregation principle

Use the Interface Segregation Principle to tidy the following:

interface ICrew
{
  function communicate(){}
  function useLightSaber(){}
  function flyShip(ship:Ship)
}
@rymawby
rymawby / shipped.md
Last active February 26, 2016 09:01
Shipped 2016
Ry 1 4 Carlito
http://www.superawesome.work GoDaddy domain search
Nowt Brightscript syntax highlighter
Nowt Brightscript breakpoints
Nowt waffle.io-desktop-wrapper
@rymawby
rymawby / brightscript-component-usage-scene-graph-xml.md
Last active May 19, 2017 01:49
Brightscript functions and components usage in Scene Graph XML
BrightScript Notes
ParseJson() Can only be used in a Task node
parseXml() Can only be used in a Task node
ReadAsciiFile() Can only be used in a Task node
roAppInfo Cannot be used in a Scene Graph application
roAppManager User interface component, cannot be used in a Scene Graph application
roAudioMetadata Cannot be used in a Scene Graph application
roAudioPlayer Cannot be used in a Scene Graph application
roAudioResource Cannot be used in a Scene Graph application
@rymawby
rymawby / screen-graph-example.brs
Created December 29, 2015 14:10
Screen graph example
screen = CreateObject("roSGScreen") ' create the roSGScreen
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
scene = screen.CreateScene("Scene") ' create a Scene node
screen.show() ' display the screen
@rymawby
rymawby / get-curl-http-headers.sh
Created December 21, 2015 15:26
Get curl HTTP headers
curl http://domain.com -I
@rymawby
rymawby / git-search-all-revisions.sh
Created December 17, 2015 11:04
Search all branches/revisions for string or regex
git grep "search string or regex" $(git rev-list --all)
@rymawby
rymawby / padawan-to-jedi-visitor-pattern.md
Created December 10, 2015 12:02
Padawan to Jedi: Visitor Pattern

The Millenium Falcon has a crew of Han Solo, Chewbacca and Luke Sky Walker. Write the classes (included the Visitor class referenced below) you need to make the crew say (trace) their catchphrases (e.g. Chewy says "Gwaaraghhghll").

Class MilleniumFalcon
{
	protected var han:Pilot
	protected var chewbacca:Wookie;
	protected var luke:Gunner;
	
	function accept(visitor:IMilleniumFalconVisitor) : Void