1/03/2023
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
local wezterm = require "wezterm" | |
local config = wezterm.config_builder() | |
local action = wezterm.action | |
config.set_environment_variables = { | |
PATH = '/opt/homebrew/bin:' .. os.getenv('PATH') | |
} | |
local function scheme_for_appearance(appearance) | |
if appearance:find "Dark" then |
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 | |
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "syntax_tree" | |
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
# frozen_string_literal: true | |
require "rubygems/package" | |
require "net/http" | |
require "tmpdir" | |
queue = Queue.new | |
Gem::SpecFetcher.new.available_specs(:latest).first.each do |source, gems| | |
gems.each do |tuple| | |
gem_name = File.basename(tuple.spec_name, ".gemspec") |
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
name: Update next | |
on: | |
pull_request: | |
paths: | |
- "Gemfile.lock" | |
jobs: | |
update: | |
runs-on: ubuntu-20.04 |
I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.
"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.
Integrating ConsoleZ + Powershell + Git for Windows + posh-git (with SSH agent forwarding + Vagrant)
Tested on: Windows 10
This setup includes the following:
- Using ConsoleZ for your terminal (This is optional. If you don't want it, skip anything having to do with ConsoleZ and just use PowerShell)
- Running PowerShell behind the scenes
- Installing Git for Windows + posh-git, to provide git commands (and ssh) to PowerShell
- Auto-starting posh-git's SSH-Agent for SSH forwarding to remote servers, VMs, Vagrant, etc.
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
# minitest uses Gem.find_files, so this should be somewhere on the load path: | |
# $LOAD_PATH/minitest/after_runnable_plugin.rb | |
class Minitest | |
class AfterRunnableReporter < AbstractReporter | |
def initialize(after_runnable, methods) | |
@after_runnable, @methods = after_runnable, methods | |
end | |
def prerecord(klass, name) | |
@methods[klass].delete(name) |
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
module xxx | |
class Application < Rails::Application | |
#(中略) | |
config.middleware.swap ActiveRecord::ConnectionAdapters::ConnectionManagement, | |
'ActiveRecord::ConnectionAdapters::ReconnectOnErrorManagement' | |
end | |
end |
NewerOlder