This file contains hidden or 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
| mode | |
| S_IFMT 0170000 File Type | |
| S_IFSOCK 0140000 socket | |
| S_IFLNK 0120000 symbolic link | |
| S_IFREG 0100000 regular file | |
| S_IFBLK 0060000 block device | |
| S_IFDIR 0040000 directory | |
| S_IFCHR 0020000 character device | |
| S_IFIFO 0010000 FIFO | |
| N/A 07777 File Mode bits |
This file contains hidden or 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
| ACTION=="add", SUBSYSTEM=="video4linux", ENV{ID_V4L_CAPABILITIES}==":capture:" ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="0892", RUN+="/usr/bin/v4l2-ctl -d $devnode --set-ctrl focus_automatic_continuous=0,focus_absolute=0" |
This file contains hidden or 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
| #!/bin/bash -e | |
| LATEST_VERSION="$( | |
| wget -qO- 'https://kernel.ubuntu.com/~kernel-ppa/mainline/' \ | |
| | grep -E 'href="v[0-9.]+/"' \ | |
| | cut -d \" -f8 \ | |
| | cut -c2- \ | |
| | cut -d/ -f1| sort --version-sort \ | |
| | tail -n 1 | |
| )" |
This file contains hidden or 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
| PAM | |
| type control module-path module-arguments | |
| type: management group | |
| account | |
| non-auth account management | |
| auth | |
| authenticate | |
| group membership |
This file contains hidden or 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 python | |
| import evdev | |
| import time | |
| import logging | |
| import os | |
| class MouseToKeyboard(object): | |
| LOOP_SLEEP = 1 |
This file contains hidden or 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
| event=ibm/hotkey LEN0068:00 00000080 000060c0 | |
| action=/etc/acpi/toggle-tablet-mode.sh |
This file contains hidden or 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
| # Convert given strig in CamelCase to snake_case. | |
| def camel_to_snake_case string | |
| string.gsub(/([^A-Z])([A-Z])/, '\1_\2').downcase | |
| end | |
| # Convert given string in snake_case to CamelCase | |
| def snake_to_camel_case string | |
| string.split('_').map(&:downcase).map(&:capitalize).join('') | |
| end |
This file contains hidden or 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
| class RetryProxy < BasicObject | |
| def initialize target, retries, logger=nil | |
| @target = target | |
| @retries = retries | |
| @logger = logger | |
| end | |
| BasicObject.instance_methods.each do |basic_object_instance_method| | |
| define_method(basic_object_instance_method) do |*args, &block| |
This file contains hidden or 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 | |
| require 'socket' | |
| require 'thwait' | |
| unless ARGV.size == 2 | |
| STDERR.puts "Usage: #{$PROGRAM_NAME} listen_address:listen_port target_address:target_port" | |
| exit 1 | |
| end | |
| listen_address, listen_port = ARGV.shift.split(':') |
This file contains hidden or 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
| # Ensure that all ruby process instances use Simplecov | |
| task :simplecov_setup do | |
| ENV['RUBYLIB'] = "#{Dir.pwd}:#{ENV['RUBYLIB']}" | |
| ENV['RUBYOPT'] = '-r configure_simplecov' | |
| sh 'rm -rf coverage/' | |
| end | |
| # Generate a final report, with all merged results | |
| task :simplecov_report do | |
| require 'simplecov' |
NewerOlder