This file contains 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
# HOW TO USE: | |
# ruby gen_pull_request_csv.rb ownername/repo 2024-01-01 | |
require 'json' | |
require 'csv' | |
@token = ENV.fetch('GH_TOKEN') | |
def run_api(path) | |
call = <<~CURL |
This file contains 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 'whenever' | |
ENV['RAILS_ENV'] = 'production' | |
ENV['MASTER_HOST'] = Socket.gethostname | |
options = { | |
crontab_command: 'crontab', | |
file: 'config/schedule.rb', | |
} | |
output = Whenever::JobList.new(options).send(:cron_jobs) | |
def parse(match) |
This file contains 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 "net/http" | |
require "json" | |
require "csv" | |
require "time" | |
page = 1 | |
def time_parse(time) | |
return unless time |
This file contains 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 | |
# | |
# (1) copy to: ~/bin/ssh-host-colorize | |
# (2) set: alias ssh=~/bin/ssh-host-colorize | |
# | |
set_term_bgcolor(){ | |
local R=$1 | |
local G=$2 | |
local B=$3 |
This file contains 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
# Usage: | |
# ruby <(curl -sL https://gist.githubusercontent.com/kei-p/28e117a8ea3c57959be6e106169fa834/raw/sound_roulette) | |
SOUNDS = %w(C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B) | |
SOUNDS.shuffle.each do |sound| | |
print "#{sound} " | |
gets | |
end | |
puts 'END' |
This file contains 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
source "https://rubygems.org" | |
gem 'redcarpet' | |
gem 'rubyXL' |
This file contains 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
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>iTERM2</appname> | |
<equal>com.googlecode.iterm2</equal> | |
</appdef> | |
<appdef> | |
<appname>MACVIM</appname> | |
<equal>org.vim.MacVim</equal> | |
</appdef> |
This file contains 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 Activity < ::PublicActivity::Activity | |
has_many :notifications, dependent: :destroy | |
end |
This file contains 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
channel=$SLACK_CHANNEL | |
service_url=$SLACK_SERVICES | |
message="Hello World!!" | |
payload="{\"channel\": \"${channel}\", \"username\": \"slackman\", \"text\": \"${message}\", \"icon_emoji\": \":smile:\"}" | |
curl -X POST \ | |
-H 'Content-type: application/json' \ | |
--data "${payload}" \ | |
${service_url} |
NewerOlder