JetBrains Toolbox fails to update it's CLI scripts from time to time, and even if it does - they don't work as expected.
This is my ugly attempt to fix this on OSX.
| # | |
| # Rescuable allows you to lazily wrap methods with a rescue logic outside. | |
| # Example: | |
| # | |
| # class Foo | |
| # extend Rescuable | |
| # | |
| # def kaboom | |
| # raise RuntimeError, 'This will be rescued and will return 1337' | |
| # raise 'This, however, will not be rescued' |
I hereby claim:
To claim this, I am signing this object:
| import sublime | |
| import sublime_plugin | |
| class ShowZeroWidthCharacters(sublime_plugin.EventListener): | |
| """ | |
| Tries to detect and mark zero-width joiners, non-joiners, and other invisible characters. | |
| Most of the characters were detected by manually testing code points from C++ specs. | |
| http://en.cppreference.com/w/cpp/language/identifiers | |
| """ |
| #!/usr/bin/env node | |
| const | |
| fs = require('fs'), | |
| http = require('http'), | |
| https = require('https') | |
| path = require('path'), | |
| url = require('url'); | |
| class WebServer { |
| unless File.exist?('Gemfile') | |
| File.write('Gemfile', <<-GEMFILE) | |
| source 'https://rubygems.org' | |
| gem 'rails', :github => 'rails/rails' | |
| gem 'sqlite3' | |
| GEMFILE | |
| system 'bundle' | |
| end |
| #!/usr/bin/env ruby | |
| require 'set' | |
| require 'cgi' | |
| require 'exifr' | |
| require 'rmagick' | |
| require 'fileutils' | |
| module HTML |
| #!/usr/bin/env ruby | |
| require 'fileutils' | |
| require 'exifr' | |
| Dir['Photos/*.*'].each { |filename| | |
| source = "#{Dir.pwd}/#{filename}" | |
| destination = nil | |
| begin |
| def collection_from_string(songs_as_string, artist_tags) | |
| songs_as_string.strip.split("\n").map do |line| | |
| name, artist, genre, tags = line.split('.').map(&:strip) | |
| genre, subgenre = genre.split(',').map(&:strip) | |
| tags = tags.to_s.split(',').push(genre).push(subgenre).concat(Array(artist_tags[artist])).reject(&:nil?).map(&:strip).map(&:downcase) | |
| {:name => name, :artist => artist, :genre => genre, :subgenre => subgenre, :tags => tags} | |
| end | |
| end |