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
#!/usr/bin/env ruby | |
message_file = ARGV[0] | |
message = File.read(message_file, :encoding => Encoding::UTF_8) | |
# remove prefix issue number like [#1234] from COMMIT_EDITMSG | |
message = message.sub(/^\[#[0-9A-Za-z_].*\]/, "") | |
# remove comment | |
message = message.gsub(/^#(?! ------------------------ >8 ------------------------).*\n|^\n/, "") |
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
Section "InputClass" | |
Identifier "evdev touchpad catchall" | |
Driver "synaptics" | |
MatchDevicePath "/dev/input/event*" | |
MatchIsTouchpad "on" | |
Option "Protocol" "event" | |
Option "SHMConfig" "on" | |
###CUSTOMIZE SECTION### | |
Option "GrabEventDevice" "on" | |
Option "FingerLow" "10" # touchpad sensitivity |
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
custom_gemfile = <<~GEMFILE | |
gem "solargraph", require: false | |
gem 'solargraph-rails', require: false | |
# gem 'rails', path: '~/.ghq/github.com/rails/rails' | |
# gem 'activerecord', path: '~/.ghq/github.com/rails/rails/activerecord' | |
gem 'actionpack', path: '~/.ghq/github.com/rails/rails/actionpack' | |
gem 'activesupport', path: '~/.ghq/github.com/rails/rails/activesupport' | |
gem 'debug' | |
GEMFILE |
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
# ./lib/tasks/db.rake | |
require 'active_record' | |
@logger = Logger.new(STDOUT) | |
namespace :db do | |
desc "Dumps the database to tmp/dbname.dump" | |
task mysql_dump: [:environment, :load_config] do | |
environment = Rails.env | |
configuration = ActiveRecord::Base.configurations[environment] |
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
function gnome-wayland-change-finger-count() { | |
local finger_count=$1 | |
case "${finger_count}" in | |
3|4|5) | |
echo "changing finger count to ${finger_count}" | |
# check if the file we want to customize is in the gresource list | |
if gresource list /usr/lib/gnome-shell/libgnome-shell.so | grep -q 'swipetracker.js'; then | |
# create a folder to hold your custom overlays | |
mkdir -p ~/.gnome-shell-custom-overlays/ui |
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
"検索をファイルの先頭へ循環しない | |
set nowrapscan | |
"大文字小文字の区別なし | |
set ignorecase | |
"検索時に大文字を含んでいたら大/小を区別 | |
set smartcase | |
"検索対象をハイライト |
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
namespace :model_from_schema do | |
desc 'Generate model files from db schema' | |
task gen: :environment do | |
module ModelGenerator | |
Models = {} | |
module Evaluator | |
module_function | |
def create_table(table_name, *) |
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 'csv' | |
class Mf2Freee | |
FILE_NAME = "収入・支出詳細_2020" | |
def run | |
files = Dir.glob("./#{FILE_NAME}*.csv") | |
file = files.first | |
raise 'file not found' if file.nil? | |
## mf ## |
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
# Single Command, runs 2 calls to gdbus to get the currently active Window from Gnome 3.x | |
# Escaped so you can copy and paste into terminal directly | |
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\)[`gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\).findIndex\(a\=\>a.meta_window.has_focus\(\)===true\) | cut -d"'" -f 2`].get_meta_window\(\).get_wm_class\(\) | cut -d'"' -f 2 | |
# Unescaped version, will not run | |
# Broken down into 2 commands. | |
# Call to Gnome to get the array location of the active Application | |
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m \ |
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
.PHONY: all | |
TODAY := $(shell date --rfc-3339 date) | |
all: help | |
backup_QCA6174: ## backup | |
mkdir -p backup/$(TODAY)/ | |
cp -a /lib/firmware/ath10k/QCA6174 backup/$(TODAY)/QCA6174 |
NewerOlder