This file contains hidden or 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
| # or simply: | |
| 'foobar'.tr 'A-Za-z','N-ZA-Mn-za-m' | |
| # rot(x) | |
| class String | |
| def rot(num = 13) | |
| return self.split('').collect do|ch| | |
| if /^[a-z]$/ === ch | |
| ((ch.ord + num - 'a'.ord) % 26 + 'a'.ord).chr |
This file contains hidden or 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
| import Svg exposing (..) | |
| import Svg.Attributes exposing (..) | |
| import Html exposing (Html) | |
| type alias Pattern = List (List Int) | |
| positionPattern : Pattern | |
| positionPattern = | |
| [ | |
| [1, 1, 1, 1, 1, 1, 1] |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| NAMES = %w{ | |
| Heinz | |
| Ina | |
| Ferdinand | |
| Konstantin | |
| Kaspar | |
| Katalin | |
| Leonie |
This file contains hidden or 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
| javascript: | |
| function isJiraPage() { | |
| return window.location.href.indexOf("jira") > -1; | |
| }; | |
| function isJiraSprintPage() { | |
| return window.location.href.indexOf("selectedIssue") > -1; | |
| }; | |
| function isBasecampPage() { |
This file contains hidden or 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
| a = ['-', '/', '|', '\\'] | |
| loop do | |
| print "\r#{a.rotate!.first}" | |
| sleep 0.1 | |
| end |
This file contains hidden or 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
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| addressable (2.5.1) | |
| public_suffix (~> 2.0, >= 2.0.2) | |
| capybara (2.14.4) | |
| addressable | |
| mime-types (>= 1.16) | |
| nokogiri (>= 1.3.3) | |
| rack (>= 1.0.0) |
This file contains hidden or 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
| GIT | |
| remote: git://github.com/hanami/view.git | |
| revision: 1d2cc445ef96b5a58c61d8f7e6d5dfa44c917b5a | |
| branch: 1d2cc445ef96b5a58c61d8f7e6d5dfa44c917b5a | |
| specs: | |
| hanami-view (1.0.0) | |
| hanami-utils (~> 1.0) | |
| tilt (~> 2.0, >= 2.0.1) | |
| GEM |
This file contains hidden or 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
| # | |
| # A quick and dirty fixture implementation for use with Hanami, RSpec and PostgreSQL. | |
| # Fixtures will be loaded when the suite starts and will be reset using transactions | |
| # to the same state after each test case. | |
| # | |
| # Supports associations like so (author has many books): | |
| # | |
| # # authors.yml | |
| # rowling: | |
| # name: J.K. Rowling |
This file contains hidden or 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 'openssl' | |
| ALGORITHM = 'AES-256-CBC' | |
| puts 'Enter key to decrypt with (in hexadecimal):' | |
| hex_key = gets.chomp | |
| puts 'Enter message to decrypt (in hexadecimal):' | |
| hex_message = gets.chomp |
This file contains hidden or 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
| ALPHABET = /^[A-Z]+$/ | |
| COMMANDS = ['encrypt', 'decrypt'] | |
| command = ARGV[0] | |
| key = ARGV[1].to_i | |
| text = ARGV[2] | |
| if COMMANDS.include? command | |
| if ALPHABET =~ text | |
| encrypted = text.chars.map do |character| |