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 'stackprof', require: false | |
| gem 'ruby-prof', require: false |
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 "yaml" | |
| require "twitter" | |
| config = YAML.load_file(File.expand_path("~/.trc")).dig("profiles", "qyliss").each_value.first | |
| last_status = ARGV.fetch(0) | |
| twitter = Twitter::REST::Client.new do |t| | |
| t.consumer_key = config.fetch("consumer_key") | |
| t.consumer_secret = config.fetch("consumer_secret") |
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
| #!/bin/bash | |
| set -e | |
| CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/ "$1" stdout -l eng | xml esc) | |
| hex=$((cat <<EOF | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.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
| -- ln -s ~/repos/config/init.lua ~/.hammerspoon/init.lua | |
| -- Global variable for the Command Mode | |
| cMode = hs.hotkey.modal.new({}, "F17") | |
| -- Global variable for Delete Mode | |
| dMode = hs.hotkey.modal.new({}, 'F20') | |
| -- Global variable for Select Mode | |
| sMode = hs.hotkey.modal.new({}, 'F19') |
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
| accomplished | |
| aggravated | |
| amused | |
| angry | |
| annoyed | |
| anxious | |
| apathetic | |
| artistic | |
| awake | |
| bitchy |
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
| class @Reloader | |
| constructor: (@selector = '.wrapper', @path, @interval = 2000) -> | |
| @start() | |
| start: => | |
| @timer = setInterval(@fetch, @interval) | |
| stop: => | |
| clearInterval(@timer) |
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
| AWS.config(access_key_id: ENV['AWS_ACCESS_KEY_ID'], | |
| secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'] ) | |
| S3_BUCKET = AWS::S3.new.buckets[ENV['S3_BUCKET']] |
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
| desc "Running all the benchmarks and writing results to file" | |
| task :benchmark do | |
| STDOUT.puts("Benchmarking:") | |
| Dir[File.join(File.dirname(__FILE__), "bench", "**", "*.rb")].each do |benchmark| | |
| STDOUT.puts <<-DOCUMENT | |
| --- | |
| file: #{benchmark} | |
| platform: #{RUBY_DESCRIPTION} | |
| timestamp: #{Time.now} | |
| results: | |
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
| # config/routes.rb | |
| resources :documents do | |
| resources :versions, controller: "documents/versions" do | |
| post :restore, on: :member | |
| end | |
| resource :lock, controller: "documents/locks" | |
| 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
| When starting a project that includes refinerycms-blog: | |
| $ rake refinery:override view=refinery/pages/* | |
| $ rake refinery:override view=layouts/* | |
| $ rake refinery:override view=refinery/blog/shared/* | |
| $ rake refinery:override view=refinery/blog/posts/* | |
| $ rake refinery:override view=refinery/* | |
| $ rake refinery:override controller=refinery/blog/* | |
| $ rake refinery:override controller=refinery/* |
NewerOlder