Fix trailing whitespace on all files

Tidy files; tidy soul!
pull/99/head
terminalforlife 4 years ago
parent 9bda601ca8
commit d7473ac185

@ -1,5 +1,5 @@
# MegaCli introduced by LSI as a command line administration of LSI MegaRaid controllers. # MegaCli introduced by LSI as a command line administration of LSI MegaRaid controllers.
# With megacli we can create physical raids, gather info about raids and monitor raids. # With megacli we can create physical raids, gather info about raids and monitor raids.
# Install MegaCLI # Install MegaCLI
yum install MegaCli # CentOS yum install MegaCli # CentOS

@ -7,7 +7,7 @@
// To Compile w/ specific executable name: g++ my_script.cpp -o my.executable // To Compile w/ specific executable name: g++ my_script.cpp -o my.executable
// To Execute: ./my.executable // To Execute: ./my.executable
int main() { int main() {
std::cout << "Hello" << endl; std::cout << "Hello" << endl;
return 0; return 0;
} }

@ -7,7 +7,7 @@
# elm package install elm-lang/html # elm package install elm-lang/html
# after that create Hello.elm in this directory # after that create Hello.elm in this directory
# To start: # To start:
# elm reactor # elm reactor
# Read more here: # Read more here:
# https://www.elm-tutorial.org/en/01-foundations/01-hello.html # https://www.elm-tutorial.org/en/01-foundations/01-hello.html
module Hello exposing (..) module Hello exposing (..)

@ -21,6 +21,6 @@ c <- 1
c <- 2 c <- 2
close(c) close(c)
for i := 0; i < 3; i++ { for i := 0; i < 3; i++ {
fmt.Printf("%d ", <-c) fmt.Printf("%d ", <-c)
} }
// 1 2 0 // 1 2 0

@ -3,7 +3,7 @@ ch <- 42 // Send a value to the channel ch.
v := <-ch // Receive a value from ch v := <-ch // Receive a value from ch
// Create a buffered channel. // Create a buffered channel.
// Writing to a buffered channels does not block // Writing to a buffered channels does not block
// if less than <buffer size> unread values have been written. // if less than <buffer size> unread values have been written.
ch := make(chan int, 100) ch := make(chan int, 100)
// Non-buffered channels block. // Non-buffered channels block.

@ -4,4 +4,4 @@ r := &Vertex{1, 2} // r is also a pointer to a Vertex
// The type of a pointer to a Vertex is *Vertex // The type of a pointer to a Vertex is *Vertex
// new creates a pointer to a new struct instance // new creates a pointer to a new struct instance
var s *Vertex = new(Vertex) var s *Vertex = new(Vertex)

@ -68,7 +68,7 @@ func outer() (func() int, int) {
func main() { func main() {
fmt.Println(adder(1, 2, 3)) // 6 fmt.Println(adder(1, 2, 3)) // 6
fmt.Println(adder(9, 9)) // 18 fmt.Println(adder(9, 9)) // 18
nums := []int{10, 20, 30} nums := []int{10, 20, 30}
fmt.Println(adder(nums...)) // 60 fmt.Println(adder(nums...)) // 60
} }

@ -1,4 +1,4 @@
// Goroutines are lightweight threads (managed by Go, not OS threads). // Goroutines are lightweight threads (managed by Go, not OS threads).
// `go f(a, b)` starts a new goroutine which runs `f` (given `f` is a function). // `go f(a, b)` starts a new goroutine which runs `f` (given `f` is a function).
// //
// just a function (which can be later started as a goroutine) // just a function (which can be later started as a goroutine)

@ -10,7 +10,7 @@ default:
fmt.Println("Other") fmt.Println("Other")
} }
// as with for and if, you can have an assignment statement before the switch value // as with for and if, you can have an assignment statement before the switch value
switch os := runtime.GOOS; os { switch os := runtime.GOOS; os {
case "darwin": ... case "darwin": ...
} }

@ -8,7 +8,7 @@ var newA = myArray.slice(0);
'<b>A</b>'.replace(/<[^>]+>/gi, ''); '<b>A</b>'.replace(/<[^>]+>/gi, '');
// Reverse a string // Reverse a string
var str = "abc def ghi."; var str = "abc def ghi.";
str.split('').reverse().join(''); // '.ihg fed cba' str.split('').reverse().join(''); // '.ihg fed cba'
// Reverse order of words in a string // Reverse order of words in a string

@ -14,8 +14,8 @@ Map[f,l,{2,5}]
(* The default levelspec is {1} *) (* The default levelspec is {1} *)
Map[f,l]===Map[f,l,{1}] Map[f,l]===Map[f,l,{1}]
(* (*
A positive level n consists of all parts of expr specified by n indices. A positive level n consists of all parts of expr specified by n indices.
A negative level -n consists of all parts of expr with depth n. A negative level -n consists of all parts of expr with depth n.
Level 0 corresponds to the whole expression. Level 0 corresponds to the whole expression.
*) *)

@ -28,7 +28,7 @@ named_params_example({
sub named_params_with_defaults { sub named_params_with_defaults {
my ( $arg ) = @_; my ( $arg ) = @_;
# Use my ( $self, $arg ) = @_; if you are in object land. # Use my ( $self, $arg ) = @_; if you are in object land.
# #
# Set defaults # Set defaults
# If option given Use options Else # If option given Use options Else
my $one = exists $arg->{one} ? $arg->{one} : "default1"; my $one = exists $arg->{one} ? $arg->{one} : "default1";

@ -1,4 +1,4 @@
# to install: # to install:
# (Debian/Ubuntu) apt-get install rakudo # (Debian/Ubuntu) apt-get install rakudo
# (Fedora/CentOS) yum install perl6 (or rakudo) # (Fedora/CentOS) yum install perl6 (or rakudo)
# to execute: perl6 my_script.pl # to execute: perl6 my_script.pl

@ -22,7 +22,7 @@ ALTER TABLE table_name ALTER COLUMN [SET DEFAULT value | DROP DEFAULT]
ALTER TABLE table_name ADD PRIMARY KEY (column,...); ALTER TABLE table_name ADD PRIMARY KEY (column,...);
-- Remove the primary key from a table -- Remove the primary key from a table
ALTER TABLE table_name ALTER TABLE table_name
DROP CONSTRAINT primary_key_constraint_name; DROP CONSTRAINT primary_key_constraint_name;
-- Rename a table -- Rename a table

@ -3,13 +3,13 @@
class Dog: class Dog:
# __init__ is the constructor, run on instantiation # __init__ is the constructor, run on instantiation
# The 'self' parameter refers to the calling instance of the class. # The 'self' parameter refers to the calling instance of the class.
# It's automatically provided to methods called on an instance of this # It's automatically provided to methods called on an instance of this
# class. It can be named anything, but 'self' is the convention. # class. It can be named anything, but 'self' is the convention.
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
# Class methods (or static methods) are created by adding the staticmethod # Class methods (or static methods) are created by adding the staticmethod
# decorator. The 'self' parameter is not passed to these methods. # decorator. The 'self' parameter is not passed to these methods.
@staticmethod @staticmethod
def unrelated_class_method(): def unrelated_class_method():
print('this is not an instance method') print('this is not an instance method')

@ -6,7 +6,7 @@ fn main() {
let t = thread::spawn(|| { let t = thread::spawn(|| {
println!("In a new thread!"); println!("In a new thread!");
}); });
// Wait for execution of spawned thread to join back up with main thread // Wait for execution of spawned thread to join back up with main thread
let result = t.join(); let result = t.join();

@ -5,7 +5,7 @@
// This example would be a Tuple3 // This example would be a Tuple3
(1,2,3) (1,2,3)
// tuple sugar // tuple sugar
// This example would be a Tuple2 // This example would be a Tuple2
(1 -> 2) //same as (1 -> 2) //same as
(1, 2) (1, 2)

@ -23,7 +23,7 @@ class C(var x: R) {
// //
// alternative constructor // alternative constructor
def this = this(42) def this = this(42)
} }
// anonymous class // anonymous class
new{ ... } new{ ... }

@ -9,7 +9,7 @@ val x = 5
// BAD // BAD
x = 5 x = 5
// lazy value // lazy value
// immutable, evaluated once but only when called // immutable, evaluated once but only when called
lazy val x = 5 lazy val x = 5

@ -5,7 +5,7 @@
curl -L https://aka.ms/InstallAzureCli | bash curl -L https://aka.ms/InstallAzureCli | bash
# create a resource group named "MyResourceGroup" in the westus2 region of Azure # create a resource group named "MyResourceGroup" in the westus2 region of Azure
az group create -n MyResourceGroup -l westus2 az group create -n MyResourceGroup -l westus2
# create a Linux VM using the UbuntuTLS image, with two attached storage disks of 10 GB and 20 GB # create a Linux VM using the UbuntuTLS image, with two attached storage disks of 10 GB and 20 GB
az vm create -n MyLinuxVM -g MyResourceGroup --ssh-key-value $HOME/.ssh/id_rsa.pub --image UbuntuLTS --data-disk-sizes-gb 10 20 az vm create -n MyLinuxVM -g MyResourceGroup --ssh-key-value $HOME/.ssh/id_rsa.pub --image UbuntuLTS --data-disk-sizes-gb 10 20

@ -1,4 +1,4 @@
# Bonnie++ # Bonnie++
# disk and file system benchmarking tool for measuring I/O performance # disk and file system benchmarking tool for measuring I/O performance
# benchmark disk mounted at /tmp/; use `user` for that # benchmark disk mounted at /tmp/; use `user` for that

@ -1,7 +1,7 @@
# Create a btrfs file system on /dev/sdb, /dev/sdc, and /dev/sdd # Create a btrfs file system on /dev/sdb, /dev/sdc, and /dev/sdd
mkfs.btrfs /dev/sdb /dev/sdc /dev/sdd mkfs.btrfs /dev/sdb /dev/sdc /dev/sdd
# btrfs with just one hard drive, metadata not redundant # btrfs with just one hard drive, metadata not redundant
# (this is danegerous: if your metadata is lost, your data is lost as well) # (this is danegerous: if your metadata is lost, your data is lost as well)
mkfs.btrfs -m single /dev/sdb mkfs.btrfs -m single /dev/sdb

@ -2,7 +2,7 @@
cd ~/.bazaar/plugins cd ~/.bazaar/plugins
bzr branch lp:bzr-fastimport fastimport bzr branch lp:bzr-fastimport fastimport
# you can do it manually: # you can do it manually:
# pip install # pip install
# python setup.py build_ext -i # python setup.py build_ext -i
# mv ... ~/.bazaar/plugins # mv ... ~/.bazaar/plugins
# probably you will need this patch: # probably you will need this patch:

@ -14,7 +14,7 @@ curl http://example.com/pic[1-24].jpg
curl -L http://example.com/file curl -L http://example.com/file
# Download a file and pass HTTP Authentication # Download a file and pass HTTP Authentication
curl -u username:password URL curl -u username:password URL
# Download a file with a Proxy # Download a file with a Proxy
curl -x proxysever.server.com:PORT http://addressiwantto.access curl -x proxysever.server.com:PORT http://addressiwantto.access

@ -1,4 +1,4 @@
# enhanced version of GNU dd with features useful for forensics and security. # enhanced version of GNU dd with features useful for forensics and security.
# includes ability to have mulitple output targets # includes ability to have mulitple output targets
# write file image to an SD card showing a progress bar based on filesize # write file image to an SD card showing a progress bar based on filesize

@ -1,4 +1,4 @@
# identify # identify
# #
# describes the format and characteristics of one or more image files # describes the format and characteristics of one or more image files

@ -1,4 +1,4 @@
# ioreg # ioreg
# show I/O Kit registry (Mac OS X) # show I/O Kit registry (Mac OS X)
# find out the arch of the efi firmware in a Mac # find out the arch of the efi firmware in a Mac

@ -58,7 +58,7 @@ jq 'flatten(1)'
# Converting to csv # Converting to csv
jq '.[] | [.foo, .bar] | @csv' -r jq '.[] | [.foo, .bar] | @csv' -r
# #
# [{ "foo": 1, "bar": 2, "baz":3 }] # [{ "foo": 1, "bar": 2, "baz":3 }]
# => 1,2 # => 1,2

@ -1,5 +1,5 @@
# jslint # jslint
# #
# The JavaScript Code Quality Tool written by Dougls Crockford # The JavaScript Code Quality Tool written by Dougls Crockford
# to install jslint # to install jslint

@ -1,4 +1,4 @@
# Julia # Julia
# high-level dynamic programming language designed to address the needs of high-performance numerical analysis # high-level dynamic programming language designed to address the needs of high-performance numerical analysis
# and computational science while also being effective for general-purpose programming # and computational science while also being effective for general-purpose programming

@ -9,11 +9,11 @@
# whenever the user logs in: # whenever the user logs in:
launchctl load ~/Library/LaunchAgents/my_script.plist launchctl load ~/Library/LaunchAgents/my_script.plist
# Activate an agent which requires root privileges to run # Activate an agent which requires root privileges to run
# and/or should be loaded whenever any user logs in (note the absence of ~ in the path): # and/or should be loaded whenever any user logs in (note the absence of ~ in the path):
sudo launchctl load /Library/LaunchAgents/root_script.plist sudo launchctl load /Library/LaunchAgents/root_script.plist
# Activate a system-wide daemon to be loaded # Activate a system-wide daemon to be loaded
# whenever the system boots up (even if no user logs in): # whenever the system boots up (even if no user logs in):
sudo launchctl load /Library/LaunchDaemons/system_daemon.plist sudo launchctl load /Library/LaunchDaemons/system_daemon.plist

@ -4,6 +4,6 @@ libreoffice --headless --convert-to pdf *.pptx
# Save them to a different directory? # Save them to a different directory?
libreoffice --headless --convert-to pdf *.docx --outdir ~/docs/ libreoffice --headless --convert-to pdf *.docx --outdir ~/docs/
# Convert files nested inside folders? # Convert files nested inside folders?
# This uses sharkdp/fd, you could use GNU find, xargs etc. # This uses sharkdp/fd, you could use GNU find, xargs etc.
fd -e doc -e docx -x libreoffice --headless --convert-to pdf --outdir {//} {} fd -e doc -e docx -x libreoffice --headless --convert-to pdf --outdir {//} {}

@ -1,6 +1,6 @@
# ncmpcpp is an mpd client (compatible with mopidy) with a UI very similar to ncmpc, # ncmpcpp is an mpd client (compatible with mopidy) with a UI very similar to ncmpc,
# but it provides new useful features such as support for regular expressions for library searches, # but it provides new useful features such as support for regular expressions for library searches,
# extended song format, items filtering, the ability to sort playlists, and a local filesystem browser. # extended song format, items filtering, the ability to sort playlists, and a local filesystem browser.
# configure ncmpcpp # configure ncmpcpp
mkdir ~/.ncmpcpp mkdir ~/.ncmpcpp

@ -1,4 +1,4 @@
# objdump # objdump
# program for displaying various information about object files # program for displaying various information about object files
# Display the contents of the overall file header # Display the contents of the overall file header

@ -1,6 +1,6 @@
# percol # percol
# #
# adds flavor of interactive filtering to the traditional pipe concept of UNIX shell # adds flavor of interactive filtering to the traditional pipe concept of UNIX shell
# to install percol # to install percol
sudo pip install percol sudo pip install percol

@ -2,7 +2,7 @@
# The Perl 6 Language Implementation # The Perl 6 Language Implementation
# to install perl6 (in Debian/Ubuntu) # to install perl6 (in Debian/Ubuntu)
apt-get install rakudo apt-get install rakudo
# To install rakudobrew and zef (perl 6 package management) # To install rakudobrew and zef (perl 6 package management)
git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew

@ -1,4 +1,4 @@
# PHP is a server-side scripting language designed primarily for web development # PHP is a server-side scripting language designed primarily for web development
# but also used as a general-purpose programming language # but also used as a general-purpose programming language
# To view the php version: # To view the php version:

@ -11,7 +11,7 @@ rclone ls remote:path
rclone copy /local/path remote:path rclone copy /local/path remote:path
# Sync /local/path to the remote # Sync /local/path to the remote
rclone sync /local/path remote:path rclone sync /local/path remote:path
# Server side Copy # Server side Copy
rclone copy s3:oldbucket s3:newbucket rclone copy s3:oldbucket s3:newbucket

@ -1,5 +1,5 @@
# rustup # rustup
# The Rust toolchain installer # The Rust toolchain installer
# update rustup toolchain # update rustup toolchain
rustup update rustup update

@ -30,7 +30,7 @@ sox ${mono_wav} -c 2 ${stereo_wav}
# Generate Different Types of Sounds # Generate Different Types of Sounds
# ${len} - length of audio to synthesize, hh:mm:ss.frac # ${len} - length of audio to synthesize, hh:mm:ss.frac
# ${freq} - frequencies at the beginning/end of synthesis in Hz # ${freq} - frequencies at the beginning/end of synthesis in Hz
# ${type} is one of sine, square, triangle, sawtooth, trapezium, exp, # ${type} is one of sine, square, triangle, sawtooth, trapezium, exp,
# [white]noise, pinknoise, brown-noise # [white]noise, pinknoise, brown-noise
# sox -n synth ${len} ${type} ${freq} # sox -n synth ${len} ${type} ${freq}
sox -r 8000 -n output.wav synth 3 sine 300-3300 sox -r 8000 -n output.wav synth 3 sine 300-3300

@ -1,7 +1,7 @@
# SysVinit to Systemd Cheatsheet # SysVinit to Systemd Cheatsheet
# Services # Services
#------------------------------------------------------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------------------------------------------------------
# Sysvinit Command Systemd Command Notes # Sysvinit Command Systemd Command Notes
#------------------------------------------------------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------------------------------------------------------
# service frobozz start systemctl start frobozz Used to start a service (not reboot persistent) # service frobozz start systemctl start frobozz Used to start a service (not reboot persistent)
# service frobozz stop systemctl stop frobozz Used to stop a service (not reboot persistent) # service frobozz stop systemctl stop frobozz Used to stop a service (not reboot persistent)
@ -10,19 +10,19 @@
# service frobozz condrestart systemctl condrestart frobozz Restarts if the service is already running. # service frobozz condrestart systemctl condrestart frobozz Restarts if the service is already running.
# service frobozz status systemctl status frobozz Tells whether a service is currently running. # service frobozz status systemctl status frobozz Tells whether a service is currently running.
# ls /etc/rc.d/init.d/ systemctl Used to list the services that can be started or stopped # ls /etc/rc.d/init.d/ systemctl Used to list the services that can be started or stopped
# (or) systemctl list-unit-files --type=service # (or) systemctl list-unit-files --type=service
# (or) ls /lib/systemd/system/*.service /etc/systemd/system/*.service # (or) ls /lib/systemd/system/*.service /etc/systemd/system/*.service
# chkconfig frobozz on systemctl enable frobozz Turn the service on, for start at next boot, or other trigger. # chkconfig frobozz on systemctl enable frobozz Turn the service on, for start at next boot, or other trigger.
# chkconfig frobozz off systemctl disable frobozz Turn the service off for the next reboot, or any other trigger. # chkconfig frobozz off systemctl disable frobozz Turn the service off for the next reboot, or any other trigger.
# chkconfig frobozz systemctl is-enabled frobozz Used to check whether a service is configured to start or not in the current environment. # chkconfig frobozz systemctl is-enabled frobozz Used to check whether a service is configured to start or not in the current environment.
# chkconfig --list systemctl list-unit-files --type=service # chkconfig --list systemctl list-unit-files --type=service
# (or) ls /etc/systemd/system/*.wants/ # (or) ls /etc/systemd/system/*.wants/
# Print a table of services that lists which runlevels each is configured on or off # Print a table of services that lists which runlevels each is configured on or off
# chkconfig --list | grep 5:on systemctl list-dependencies graphical.target # chkconfig --list | grep 5:on systemctl list-dependencies graphical.target
# Print a table of services that will be started when booting into graphical mode # Print a table of services that will be started when booting into graphical mode
# chkconfig frobozz --list ls /etc/systemd/system/*.wants/frobozz.service # chkconfig frobozz --list ls /etc/systemd/system/*.wants/frobozz.service
# Used to list what levels this service is configured on or off # Used to list what levels this service is configured on or off
# chkconfig frobozz --add systemctl daemon-reload Used when you create a new service file or modify any configuration # chkconfig frobozz --add systemctl daemon-reload Used when you create a new service file or modify any configuration
# SysVinit to Systemd Cheatsheet # SysVinit to Systemd Cheatsheet
# Runlevels/targets # Runlevels/targets
@ -37,9 +37,9 @@
# runlevel4.target # runlevel4.target
# multi-user.target # multi-user.target
# 3 runlevel3.target Multi-user, non-graphical. Users can usually login via multiple consoles or via the network. # 3 runlevel3.target Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.
# multi-user.target # multi-user.target
# 5 runlevel5.target Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login. # 5 runlevel5.target Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.
# graphical.target # graphical.target
# 6 runlevel6.target Reboot # 6 runlevel6.target Reboot
# reboot.target # reboot.target
# emergency emergency.target Emergency shell # emergency emergency.target Emergency shell

@ -1,5 +1,5 @@
# xfs_repair # xfs_repair
# repair an XFS filesystem # repair an XFS filesystem
# rapair a XFS filesystem # rapair a XFS filesystem
xfs_repair /dev/dm-0 xfs_repair /dev/dm-0

@ -1,4 +1,4 @@
# Set the keyboard layout for the current X session # Set the keyboard layout for the current X session
setxkbmap -layout "us,ru" setxkbmap -layout "us,ru"
setxkbmap -option "grp:caps_toggle,grp_led:scroll,compose:ralt" setxkbmap -option "grp:caps_toggle,grp_led:scroll,compose:ralt"

@ -1,5 +1,5 @@
# xset # xset
# user preference utility for X # user preference utility for X
# Disable screen saver blanking # Disable screen saver blanking
xset s off xset s off
@ -19,5 +19,5 @@ xset dpms force off
# Standby screen # Standby screen
xset dpms force standby xset dpms force standby
# Suspend screen # Suspend screen
xset dpms force suspend xset dpms force suspend

Loading…
Cancel
Save