Skip to content

Instantly share code, notes, and snippets.

View RaitoBezarius's full-sized avatar
🎯
Very restricted availability

Ryan Lahfa RaitoBezarius

🎯
Very restricted availability
View GitHub Profile
@RaitoBezarius
RaitoBezarius / support-etc-hosts.patch
Created February 12, 2024 15:30
Support /etc/hosts in Mastodon patch
diff --git a/app/lib/request.rb b/app/lib/request.rb
index 8d4120868..e640fadd2 100644
--- a/app/lib/request.rb
+++ b/app/lib/request.rb
@@ -261,11 +261,7 @@ class Request
begin
addresses = [IPAddr.new(host)]
rescue IPAddr::InvalidAddressError
- Resolv::DNS.open do |dns|
- dns.timeouts = 5
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RaitoBezarius
RaitoBezarius / strace.txt
Created January 2, 2020 18:23
strace output of all cptofs processes under qemu during ext4 creation process
strace: Process 3288891 attached with 2 threads
[pid 3288893] 19:17:57 futex(0x623f7f88, FUTEX_WAIT, 4294967295, NULL <unfinished ...>
[pid 3288891] 19:17:57 mprotect(0x5d6000, 217088, PROT_READ) = 0
[pid 3288891] 19:17:57 brk(0x624c3000) = 0x624c3000
[pid 3288891] 19:17:57 mprotect(0x400083d000, 4096, PROT_READ) = 0
[pid 3288891] 19:17:57 set_tid_address(0x400104e750) = 146
[pid 3288891] 19:17:57 brk(0x624c4000) = 0x624c4000
[pid 3288891] 19:17:57 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], NULL, 8) = 0
[pid 3288891] 19:17:57 rt_sigaction(SIGRT_32, {sa_handler=0x600c3e70, sa_mask=~[RTMIN RT_1 RT_2], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x602463ca}, NULL, 8) = 0
data PosInf a = Infinity | Finite a deriving (Show, Read, Eq)
instance Ord a => Ord (PosInf a) where
compare Infinity Infinity = EQ
compare Infinity Finite{} = GT
compare Finite{} Infinity = LT
compare (Finite a) (Finite b) = compare a b
instance Num a => Num (PosInf a) where
Finite x + Finite y = Finite (x + y)
data PosInf a = Infinity | Num a deriving (Show, Read, Eq)
instance Ord a => Ord (PosInf a) where
compare Infinity Infinity = EQ
compare Infinity Num{} = GT
compare Num{} Infinity = LT
compare (Num a) (Num b) = compare a b
pInfty :: PosInf a
pInfty = Infinity
@RaitoBezarius
RaitoBezarius / i3.config
Created August 22, 2017 00:42
Double bars
# laptop mode
# bottom bar
bar {
status_command py3status -b -c ~/.config/i3status/bottom-config -l /var/log/py3status/down.laptop.log
mode hide
hidden_state hide
modifier $mod
position bottom
output LVDS1
binding_mode_indicator yes
@RaitoBezarius
RaitoBezarius / playbook.yml
Created February 9, 2017 18:13
Playbook to reproduce hang bug with auto-install
---
- hosts: gameservers
vars:
lgsm_user: csgoserver
gslt: ""
tasks:
- block:
- name: "Install basic dependencies"
yum: name={{item}} state=latest
with_items:
@RaitoBezarius
RaitoBezarius / start_agent.fish
Created December 28, 2016 17:14
Boot a SSH agent for Fish
set -gx SSH_ENV $HOME/.ssh/environment
function boot_new_agent
echo "Initializing new SSH agent..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "SSH agent initialized, ready to roll."
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null
ssh-add
end
@RaitoBezarius
RaitoBezarius / backtrace
Created October 10, 2016 10:22
Backtrace for eID
[New LWP 9934]
[New LWP 9930]
[New LWP 9931]
[New LWP 9932]
[New LWP 9938]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
@RaitoBezarius
RaitoBezarius / traceback
Created July 19, 2016 10:25
Traceback with ESLintBear
[WARNING][12:24:09] Bear ESLintBear failed to run. Take a look at debug messages (`-L DEBUG`) for further information.
[DEBUG][12:24:09] The bear ESLintBear raised an exception. If you are the writer of this bear, please make sure to catch all exceptions. If not and this error annoys you, you might want to get in contact with the writer of this bear.
Traceback information is provided below:
Traceback (most recent call last):
File "/home/raito/.virtualenvs/mangaki/lib/python3.5/site-packages/coalib/bears/Bear.py", line 231, in execute
return list(self.run_bear_from_section(args, kwargs) or [])
File "/home/raito/.virtualenvs/mangaki/lib/python3.5/site-packages/bears/js/ESLintBear.py", line 43, in process_output
output = json.loads(output)