Skip to content

Instantly share code, notes, and snippets.

View mathieujobin's full-sized avatar

Mathieu Jobin mathieujobin

  • Tokyo, Japan
View GitHub Profile
If I want to install gnome-shell from a clean kubuntu desktop
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
appmenu-gtk-module-common (0.7.6-2)
libappmenu-gtk3-parser0 (0.7.6-2)
libfwupdplugin1 (1.5.11-0ubuntu2)
Use 'sudo apt autoremove' to remove them.
@mathieujobin
mathieujobin / bundler_runtime.patch
Created March 19, 2021 00:52
Get stats on gem loading time
--- /home/mathieu/.rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb 2021-03-16 18:23:10.156609524 +0900
+++ /home/mathieu/.rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb 2021-03-19 09:50:41.349936063 +0900
@@ -61,6 +61,8 @@
def require(*groups)
groups.map!(&:to_sym)
groups = [:default] if groups.empty?
+ cur_boot_time = 0.0
+ bundle_require_boot_time = Time.now
@definition.dependencies.each do |dep|
function ScreenRecord() {
mkdir -p $HOME/Videos/
resolution=`xrandr | fgrep '*' | awk '{print $1}'` # "2560x1440"
filename="$HOME/Videos/Screencast_$(date +%Y%m%d_%H%M%S).mkv"
ffmpeg -video_size $resolution -framerate 25 -f x11grab -i $DISPLAY -f pulse -ac 2 -i default "$filename"
#-vpre lossless_ultrafast
#ffmpeg -f x11grab -r 25 -s $resolution -i $DISPLAY -f pulse -ac 2 -i default -acodec pcm_s16le -vcodec libx264 -threads 0 "$filename"
}
BEGIN KEYBASE SALTPACK ENCRYPTED MESSAGE. kl8lllV6I8IEA3d x0LJQaatoMjxD50 JctivjnGbLD8bYr OzJ2VE32Nn2a6FJ qojUzUIQxYVgFvp cF19y8ObOpuwgYG GqJaRI6zRNkJ7BG iThFY5QrWkXaT70 YnFmA47TFu2baMH r7aX2XDqEi4y47E rotJtT21mJOvZOK cORrKZgk5yfKaj4 mpTFIcHWiBZT1px rXZMCe19vIwGeiV 111jAuGGyh5gqVh O0zEiuwlNpS9HVM 1Y7xrOJAQ9wHzwY qPIWBWGkwhHx9oI 0Z4wmUTzpuRU7ww Q7NgW68juwCPGKK YkWO1QV9NjoJur3 LnxjGQlGqRgjqrg rtx3La82yRGtYFl 4lzKm3FBQ7C2T1G S1Meqhntdz86lxw L9pmUOVo2pwF72k HInt5dFnkHA8YiJ 5BBhfieTyXOpdUJ coHiqUVvU3LItIi GRGiNYQRWvuFUnH 3ygpUXKHpeWsGAc aWuXsqIGLk1j8XY mFGzgOsmCMthmA2 24PAAiQUg6OxBPe 0UXSaLP8tY7oFqt PsPwmiUc6daqwtK QqH0SzwhPr3r1gc EUupbV4D4FcX2I4 Nl9m85HxEOjiaGa 0YOuOnNJarFFq6v xrfwebD3wScAE7U 3UhJzORx7grQHy0 J7ObZCj7pubXplE BWHbaMb04RXOAzT kZcTMjRqhWH2CTD WSUVr7EoRHZcR1m Mkx3guMEyPNI350 9aifRh9N6Bl4TZR hQL5M302CDEG3ou s1oY8LzDX6OSc8o UJXTzVwdYLojy4U MftSSnfWPdDgv52 FzMee7BmSDxTAVI Jh44YDonaGVWa4i MYQggIaF1Ct1sTB XruINLeoWlGSMX7 jw8bpuGENPyVjeU YWOGLC9WHPTGjdl i0ZdvuT5l5e76xw 2BWusLABPhcuAEm hPM3wAbNFxTLHaA 5U0Obn
(;GM[1]FF[4]CA[UTF-8]AP[Sabaki:0.43.3]KM[0.5]SZ[13]DT[2020-03-02]PW[Leela (W)];B[mj];W[mk];B[lk];W[ll];B[lj];W[ml];B[kj];W[kk];B[ji];W[jk];B[kh](;W[hk];B[hi];W[gi];B[ii];W[fi];B[gh];W[eh];B[fh];W[dh];B[ei](;W[dk];B[jd];W[bk];B[il];W[ff];B[ik];W[jl];B[ij];W[km])(;W[jd]))(;W[ik]))
#!/bin/sh
set -ue
# (c) Copyright Fabrice Le Fessant INRIA/OCamlPro 2013
# (c) Copyright Louis Gesbert OCamlPro 2014-2017
# modified to not ask where to download it - Mathieu Jobin 2020
VERSION='2.0.6'
@mathieujobin
mathieujobin / skcluster.rb
Created November 13, 2019 06:34 — forked from stympy/skcluster.rb
Sidekiq cluster control script and systemd service
#!/usr/bin/env ruby
require 'sidekiq'
require 'sidekiq/cli'
# Default to running one process per core
def process_count
return ENV['SK_PROCESS_COUNT'].to_i unless ENV['SK_PROCESS_COUNT'].to_i == 0
case RbConfig::CONFIG['host_os']
# A module for instrumenting ActiveJob workers for Scout APM.
#
# These can appear under "Background Jobs" (default) or "Web Endpoints" in the UI, depending on the value of
# +SCOUT_TRANSACTION_TYPE+.
#
# Example usage:
#
# class BaseJob < ActiveJob::Base
#
# def perform(attributes)
@mathieujobin
mathieujobin / commit_count_per_line_change.sh
Created September 25, 2015 05:29
Yes Size Matters, Tell me the size of your commits
git log --oneline --shortstat --reverse --no-merges | grep " [^a-z]*files changed" | sed 's/[^0-9 ]//g' | ruby -e 'puts STDIN.read.split(/\n/).map{|line| a = line.split; a.shift; a.size == 1 ? a.first.to_i : (a.first.to_i - a.last.to_i).abs }.join("\n")' | sort | uniq -c |sort -n | grep "^ *[0-9][0-9]\+"