Skip to content

Instantly share code, notes, and snippets.

View nguyenvinhlinh's full-sized avatar
💭
Hey, wait! What are you trying to looking for?

Nguyen Vinh Linh nguyenvinhlinh

💭
Hey, wait! What are you trying to looking for?
View GitHub Profile
@nguyenvinhlinh
nguyenvinhlinh / keybindings.pl
Created January 16, 2023 07:33 — forked from elgalu/keybindings.pl
Export Ubuntu shortcuts: keybindings.pl -e keys.csv ;; Import (DANGER) Ubuntu shortcuts: keybindings.pl -i keys.csv
#!/usr/bin/perl
use strict;
my $action = '';
my $filename = '-';
for my $arg (@ARGV){
if ($arg eq "-e" or $arg eq "--export"){
$action = 'export';
@nguyenvinhlinh
nguyenvinhlinh / sudo btrfs subvolume list fedora_localhost-live
Created December 11, 2022 05:19
sudo btrfs subvolume list /run/media/liveuser/fedora_localhost-live
[liveuser@localhost-live ~]$ sudo btrfs subvolume list /run/media/liveuser/fedora_localhost-live
ID 256 gen 1080902 top level 5 path root
ID 257 gen 1080902 top level 5 path home
ID 262 gen 1080892 top level 256 path root/var/lib/machines
ID 830 gen 192439 top level 256 path root/var/lib/docker/btrfs/subvolumes/ad7e47dfd103ff84a96730b83b84838011d9b20654d82a5b8a5d709063cd9795
ID 831 gen 127018 top level 256 path root/var/lib/docker/btrfs/subvolumes/e1d30dd971f92687cfd71de55bba43a9ddc27ca5eb68a8a43332cb0271270735-init
ID 832 gen 127019 top level 256 path root/var/lib/docker/btrfs/subvolumes/e1d30dd971f92687cfd71de55bba43a9ddc27ca5eb68a8a43332cb0271270735
ID 833 gen 127024 top level 256 path root/var/lib/docker/btrfs/subvolumes/88047217cefcf70b18e2d65e94eea0be701be316ef7e22a0e7b56ea5f69e0da5
ID 834 gen 127025 top level 256 path root/var/lib/docker/btrfs/subvolumes/accdcd2c98fad746a455f8b65475c0d7a14253bcc21b8c9c389ccb090c073801
ID 835 gen 127026 top level 256 path root/var/lib/docker/btrfs/subvolumes/5d312be0b
#!/bin/bash
sudo yum groups install -y 'Development Tools';
sudo yum install -y autoconf;
sudo yum install -y ncurses-devel ncurses;
sudo yum install -y openssl-devel;
sudo yum install -y java-1.8.0-openjdk-devel;
sudo yum install -y yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm;
sudo yum install -y libiodbc unixODBC.x86_64 erlang-odbc.x86_64;
@nguyenvinhlinh
nguyenvinhlinh / erlang-dependencies-installing-on-fedora-29.sh
Last active May 3, 2019 13:05
erlang dependencies installation - fedora 29
sudo yum groupinstall -y 'Development Tools' 'C Development Tools and Libraries';
sudo yum install -y autoconf;
sudo yum install -y ncurses-devel;
sudo yum install -y wxGTK3-devel wxBase3;
sudo yum install -y openssl-devel;
sudo yum install -y libiodbc unixODBC.x86_64 erlang-odbc.x86_64;
sudo yum install -y libxslt;
if user.id == product.user.id and Enum.find(product.images, nil, fn(e) -> e.id == String.to_integer(image_id) end) do
^^^^^^^^^^^^^^ I would like to take result of it with pattern matching
end
DEBUG:rq.worker:Registering birth of worker precise32.27503
INFO:rq.worker:RQ worker u'rq:worker:precise32.27503' started, version 0.6.0
INFO:rq.worker:Cleaning registries for queue: default
INFO:rq.worker:Cleaning registries for queue: high
INFO:rq.worker:Cleaning registries for queue: low
INFO:rq.worker:
INFO:rq.worker:*** Listening on default, high, low...
DEBUG:rq.worker:Sent heartbeat to prevent worker timeout. Next one should arrive within 420 seconds.
DEBUG:rq.worker:Got signal SIGTERM
WARNING:rq.worker:Warm shut down requested
*** Starting uWSGI 2.0.6 (32bit) on [Thu Oct 20 10:17:58 2016] ***
compiled with version: 4.6.3 on 20 October 2016 10:12:56
os: Linux-3.8.0-38-generic #56~precise1-Ubuntu SMP Thu Mar 13 16:23:47 UTC 2014
nodename: precise32
machine: i686
clock source: unix
detected number of CPU cores: 1
current working directory: /vagrant
writing pidfile to /tmp/baggable/baggable-uwsgi.pid
detected binary path: /home/baggable/.virtualenvs/baggable/bin/uwsgi
2016/10/20 10:35:36 [crit] 26974#0: *1 connect() to unix:/tmp/baggable/baggable-uwsgi.sock failed (2: No such file or directory) while connecting to upstream, client: 10.0.2.2, server: localhost, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/tmp/baggable/baggable-uwsgi.sock:", host: "localhost:9100"
2016/10/20 10:35:36 [crit] 26974#0: *1 connect() to unix:/tmp/baggable/baggable-uwsgi.sock failed (2: No such file or directory) while connecting to upstream, client: 10.0.2.2, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:/tmp/baggable/baggable-uwsgi.sock:", host: "localhost:9100", referrer: "http://localhost:9100/"
2016/10/20 10:35:37 [crit] 26974#0: *1 connect() to unix:/tmp/baggable/baggable-uwsgi.sock failed (2: No such file or directory) while connecting to upstream, client: 10.0.2.2, server: localhost, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/tmp/baggable/baggable-uwsgi.sock:", host: "localhost:9100"
2016/10/20 10:35:37 [crit] 26974#0: *1 connect() to unix
---
- hosts: kmt
become_user: root
become: yes
gather_facts: no
remote_user: vagrant
tasks:
- name: Install postgres database
apt:
@nguyenvinhlinh
nguyenvinhlinh / rake
Created September 13, 2016 03:08
rake update rails
LoadError: libncurses.so.5: cannot open shared object file: No such file or directory - /home/nguyenvinhlinh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/x86_64-linux/readline.so
/home/nguyenvinhlinh/.rvm/gems/ruby-2.0.0-p643@dots/gems/byebug-3.1.2/lib/byebug/history.rb:1:in `require'
/home/nguyenvinhlinh/.rvm/gems/ruby-2.0.0-p643@dots/gems/byebug-3.1.2/lib/byebug/history.rb:1:in `<top (required)>'
/home/nguyenvinhlinh/.rvm/gems/ruby-2.0.0-p643@dots/gems/byebug-3.1.2/lib/byebug/interfaces/local_interface.rb:1:in `require'
/home/nguyenvinhlinh/.rvm/gems/ruby-2.0.0-p643@dots/gems/byebug-3.1.2/lib/byebug/interfaces/local_interface.rb:1:in `<top (required)>'
/home/nguyenvinhlinh/.rvm/gems/ruby-2.0.0-p643@dots/gems/byebug-3.1.2/lib/byebug/interface.rb:31:in `require'
/home/nguyenvinhlinh/.rvm/gems/ruby-2.0.0-p643@dots/gems/byebug-3.1.2/lib/byebug/interface.rb:31:in `<module:Byebug>'
/home/nguyenvinhlinh/.rvm/gems/ruby-2.0.0-p643@dots/gems/byebug-3.1.2/lib/byebug/interface.rb:1:in `<top (required)>'
/home/nguyenvinhl