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 "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| gem "rails", github: "rails/rails", branch: "main" | |
| gem "sqlite3" | |
| gem "rbs_rails" | |
| gem "active_type" | 
  
    
      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
    
  
  
    
  | # frozen_string_literal: true | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| gem "rails", github: "rails/rails", branch: "main" | 
  
    
      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/env ruby | |
| # Merge zsh's history files and print them to stdout. | |
| # Entries are sorted by timestamp. | |
| # | |
| # usage: | |
| # merge-zsh-history file1 file2 ... | |
| # format of history entry | |
| # | 
  
    
      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 'date' | |
| require 'google_drive' | |
| require 'pixela' | |
| CREDENTIAL_PATH = File.join(__dir__, 'secret', 'credential.json') | |
| SPREADSHEET_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
| PIXELA_USERNAME = 'xxxxxxxxx' | |
| PIXELA_TOKEN = 'xxxxxxxxx' | |
| PIXELA_GRAPH_ID = 'xxxxxxxxxx' | 
  
    
      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
    
  
  
    
  | def run | |
| results = [] | |
| 1.upto(100000) do |i| | |
| results.push(rand(2)) | |
| results.shift if results.size == 4 | |
| if results.size == 3 && results.uniq.size == 1 | |
| return i | |
| end | |
| 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
    
  
  
    
  | require 'active_record' | |
| class Foo < ActiveRecord::Base; end | |
| module Bar | |
| refine Integer do | |
| define_method(:+) { } | |
| end | |
| 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
    
  
  
    
  | (defun kill-buffer-file-name (nondirectory-p) | |
| (interactive "P") | |
| (let ((file-name (buffer-file-name))) | |
| (if (stringp file-name) | |
| (progn | |
| (when nondirectory-p | |
| (setq file-name (file-name-nondirectory file-name))) | |
| (message "%s" file-name) | |
| (kill-new file-name)) | |
| (error "This buffer does not visit a file")))) | 
  
    
      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
    
  
  
    
  | function bundle-cd { | |
| local output exit_status | |
| output=`bundle show $1` | |
| exit_status=$? | |
| if [ $exit_status -eq 0 ]; then | |
| cd "$output" | |
| else | |
| echo $output 1>&2 | |
| return $exit_status | |
| fi | 
  
    
      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
    
  
  
    
  | (setcdr (assoc 'action anything-c-source-minibuffer-history) | |
| (lambda (candidate) | |
| (delete-minibuffer-contents) | |
| (insert candidate))) | 
  
    
      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
    
  
  
    
  | function shogun { | |
| : | |
| } | |
| function _shogun { | |
| local -a _names | |
| _names=( | |
| Ieyasu | |
| Hidetada | 
NewerOlder