Skip to content

Instantly share code, notes, and snippets.

View rynbyjn's full-sized avatar
🤘
metal

Ryan Boyajian rynbyjn

🤘
metal
  • Denver, CO
View GitHub Profile
@rynbyjn
rynbyjn / bit_tech_symposium_notes.md
Last active May 11, 2018 19:14
BIT Technology Symposium

BIT Technology Symposium

Giving Accessibility a Face

Paul Seigneur (student, Golden High School)

  • Braile and speak (piece of technology that would speak braile)
  • Brailist (translator)
  • Screen Readers:
    • JAWS ($1100)
  • NVDA (free, but seems to require a donation, but windows only)
@rynbyjn
rynbyjn / 666.js
Created March 1, 2016 15:53
alert 666
alert([2, 3, 5, 7, 11, 13, 17].map((x) => x * x).reduce((x, y) => x + y, 0))
@rynbyjn
rynbyjn / line_numbers.sh
Last active February 24, 2017 21:51
Print out the count of lines within each file in the src
find src -type f -print | xargs wc -l
@rynbyjn
rynbyjn / Generate Apple App Icon sizes from a larger image.md
Last active January 5, 2016 00:04
Generate Apple app icon sizes from a larger image

Generate Apple App Icon sizes from a larger image

ruby generate_app_icon_sizes.rb path_to_large_image

@rynbyjn
rynbyjn / Generate release notes from PRs.md
Last active August 29, 2015 14:23
Generate release notes from closed pull requests.

Generate release notes from PRs

By default this will look at the previous 100 commits from your local .git folder in your project. To Add release notes to an older project you might want to bump that WAY up.

Also you will need a valid GitHub token in your .env file.

GenerateReleaseNotes.new('your_org/your_project', 'path_to_location_of_prev_sha_file/previous-sha.yml', ENV['GITHUB_API_TOKEN'], true)

@rynbyjn
rynbyjn / seeds.rb
Created October 1, 2014 20:14
Seed test users.
(0..10).each do |num|
unless User.exists? username: "testie#{num}"
User.create! username: "testie#{num}", email: "testie#{num}@example.com", password: 'password', password_confirmation: 'password'
end
end
@rynbyjn
rynbyjn / word_from_selection.coffee
Created June 19, 2014 20:20
Gets the closest word backwards from the cursor position within a text node.
getWordFromSelection: (e) ->
selection = document.getSelection()
word = []
text = selection.anchorNode?.wholeText || ' '
wordArr = text.split('')
anchorPos = selection.anchorOffset - 1
anchorPos = 0 if anchorPos < 0
for index in [anchorPos..0]
letter = wordArr[index]
if letter.match(/\s/)
@rynbyjn
rynbyjn / email_validator
Created April 24, 2014 23:27
Simple regex email validator
/(.+)@(.+)\.([a-z]{2,})/
@rynbyjn
rynbyjn / android_google_maps.rake
Last active August 29, 2015 13:57
Rake tasks for generating a SHA1 for use with the google maps API for Android.
# keystore vars
keystore = 'path_to_your.keystore'
keystore_alias = 'alias_for_your_keystore'
keystore_password = 'password_for_your_keystore'
namespace :android do
namespace :google do
namespace :maps do
desc 'Generates a debug SHA1 specific to your machine.'
task :debug_sha do
@rynbyjn
rynbyjn / object_byte_size
Created February 13, 2014 22:33
Calculate rough size of an object in javascript (bytes)
roughSizeOfObject: (object) ->
objectList = []
stack = [object]
bytes = 0
while stack.length
value = stack.pop()
if typeof value is "boolean"
bytes += 4
else if typeof value is "string"
bytes += value.length * 2