preparing stage
cd /mnt/base
btrfs subvolume create SVroot
btrfs subvolume create SVhome
cp stage3.tar.bz2 SVroot
tar xjvf stage3.tar.bz2
cd /mnt
umount /mnt/base| def clean(txt) | |
| mark = true | |
| txt.each_char.map { |x| | |
| if x.ascii_only? and mark | |
| mark = false | |
| ' ' | |
| elsif x.ascii_only? | |
| nil | |
| else | |
| mark = true |
| def clean(txt) | |
| mark = true | |
| txt.each_char.map { |x| | |
| if x.ascii_only? and mark | |
| mark = false | |
| ' ' | |
| elsif x.ascii_only? | |
| nil | |
| else | |
| mark = true |
preparing stage
cd /mnt/base
btrfs subvolume create SVroot
btrfs subvolume create SVhome
cp stage3.tar.bz2 SVroot
tar xjvf stage3.tar.bz2
cd /mnt
umount /mnt/base| require 'twitter' | |
| require 'twitter_oauth' | |
| require 'json' | |
| def oauth(ck, cs) | |
| access_token = nil | |
| access_secret = nil | |
| client = TwitterOAuth::Client.new( | |
| :consumer_key => ck, |
| #!/usr/bin/env ruby | |
| # license: WTFPL | |
| # Gems: | |
| # $ gem install twitter twitter_oauth | |
| require 'twitter' | |
| require 'twitter_oauth' | |
| # CONSUMER_KEY = '3nVuSoBZnx6U4vzUxf5w' |
| #!/usr/bin/env python3 | |
| import urllib.request | |
| from os import system | |
| response = urllib.request.urlopen('http://ipinfo.io/country') | |
| country = response.read().decode('utf-8').rstrip("\n") | |
| if country == 'CN': | |
| system("sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list") |
There is a baseDir variable for which you can designate the directory you want to monitor.
The variable monitors can be edited according to the lock files to be monitored and the corresponding script files to be executed when the lock files were created.
# /etc/udev/rules.d/80-filco-keyboard.rules
| # ~/.irbrc | |
| class Object | |
| def xclip | |
| IO.popen('xclip -i -selection clipboard', 'w') do |clipboard| | |
| clipboard.print(self.to_s) | |
| end | |
| end | |
| end |
| class Operation < Struct.new(:name, :args, :block) | |
| class << self | |
| attr_accessor :opposite_operations | |
| end | |
| def self.define_opposite_operations(name, name_of_opposite) | |
| @opposite_operations ||= {} | |
| @opposite_operations[name] = name_of_opposite | |
| @opposite_operations[name_of_opposite] = name | |
| end |
| #!/bin/sh | |
| xsetwacom --set 10 MapToOutput "eDP1" | |
| xsetwacom --set 10 Rotate half | |
| # +-------------------+ | |
| # | | | |
| # | +---------+ + 1/4 | |
| # | | | | | |
| # | | | | |