Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f5dee293a6
|
|||
|
462192bb85
|
|||
|
d9a8b7c442
|
|||
|
6df8890b2a
|
|||
|
1e6d70d8f4
|
+51
-26
@@ -5,6 +5,15 @@
|
||||
%unique: shell
|
||||
%sort: shell bin
|
||||
|
||||
aim: Change a CSV header
|
||||
cmd: from=number
|
||||
+ to=quantity
|
||||
+ sed -i "1 s///" "".csv
|
||||
bin: sed
|
||||
tag: csv
|
||||
tag: substitute
|
||||
tag: replace
|
||||
|
||||
aim: Roll a die
|
||||
cmd: echo $(( RANDOM % 6+1 ))
|
||||
shell: bash
|
||||
@@ -442,6 +451,17 @@ bin: printf
|
||||
tag: xargs
|
||||
tag: stdout
|
||||
|
||||
aim: Share a directory as a local website
|
||||
cmd: python3 -m http.server
|
||||
note: Anyone can go to your computer's IP address and access all files in the current directory.
|
||||
shell: sh
|
||||
bin: python3
|
||||
tag: tip
|
||||
tag: network
|
||||
tag: share
|
||||
cmd: qrencode -t ansi "$(ip route show | grep -Pom1 'src \K[\d.]+')"
|
||||
+ sudo python -m http.server 80
|
||||
|
||||
aim: Make a QR Code image
|
||||
cmd: qrencode 'https://play.google.com/store/apps/details?id=org.briarproject.briar.android' -o "${file}".png
|
||||
shell: sh
|
||||
@@ -485,6 +505,12 @@ bin: recinf
|
||||
tag: recfiles
|
||||
tag: database
|
||||
|
||||
aim: Remove non-printable characters
|
||||
cmd: sed -i 's/[^[:print:]]//g' ${file}
|
||||
shell: sh
|
||||
bin: sed
|
||||
tag: text
|
||||
|
||||
aim: Get back terminal after ssh freezes remote machine
|
||||
cmd: <Return>~.
|
||||
shell: sh
|
||||
@@ -492,6 +518,31 @@ bin: ssh
|
||||
tag: system
|
||||
tag: comfy
|
||||
|
||||
aim: Launch GUI app as root
|
||||
cmd: app=gparted
|
||||
+ sudo -E ${app}
|
||||
note: Useful for launching gparted in sway.
|
||||
shell: sh
|
||||
bin: sudo
|
||||
tag: wayland
|
||||
tag: gui
|
||||
tag: sway
|
||||
|
||||
aim: Check current keyboard layout on sway
|
||||
cmd: swaymsg -t get_inputs --raw | jq -r '.[0].xkb_active_layout_name'
|
||||
bin: sway
|
||||
bin: jq
|
||||
tag: keyboard
|
||||
tag: locale
|
||||
shell: sh
|
||||
|
||||
aim: Show name of currently selected app in sway
|
||||
cmd: swaymsg -t get_tree | jq -C '.. | select(.type?) | select(.focused==true)'
|
||||
bin: sway
|
||||
bin: jq
|
||||
tag: bar
|
||||
shell: sh
|
||||
|
||||
aim: List enabled systemd services
|
||||
cmd: systemctl list-unit-files --state enabled
|
||||
cmd: systemctl --user list-unit-files --state enabled
|
||||
@@ -582,29 +633,3 @@ bin: vipw
|
||||
bin: sudo
|
||||
tag: system
|
||||
tag: groups
|
||||
|
||||
aim: Check current keyboard layout on sway
|
||||
cmd: swaymsg -t get_inputs --raw | jq -r '.[0].xkb_active_layout_name'
|
||||
bin: sway
|
||||
bin: jq
|
||||
tag: keyboard
|
||||
tag: locale
|
||||
shell: sh
|
||||
|
||||
aim: Show name of currently selected app in sway
|
||||
cmd: swaymsg -t get_tree | jq -C '.. | select(.type?) | select(.focused==true)'
|
||||
bin: sway
|
||||
bin: jq
|
||||
tag: bar
|
||||
shell: sh
|
||||
|
||||
aim: Share a directory as a local website
|
||||
cmd: python3 -m http.server
|
||||
note: Anyone can go to your computer's IP address and access all files in the current directory.
|
||||
shell: sh
|
||||
bin: python3
|
||||
tag: tip
|
||||
tag: network
|
||||
tag: share
|
||||
cmd: qrencode -t ansi "$(ip route show | grep -Pom1 'src \K[\d.]+')"
|
||||
+ sudo python -m http.server 80
|
||||
|
||||
+2
-1
@@ -147,7 +147,8 @@ content: ### Variables
|
||||
+
|
||||
+ .PHONY: help
|
||||
+ help:
|
||||
+ @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | + sort | + column -s ':' -t
|
||||
+ @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) \
|
||||
+ | sort | column -s ':' -t
|
||||
+
|
||||
+ .PHONY: check
|
||||
+ check: ## Check you have the required dependencies
|
||||
|
||||
+4
-3
@@ -23,14 +23,15 @@ Most programs let you clear the highlighting with `<Esc>+u`.
|
||||
Follow a file as new lines are added to it:
|
||||
|
||||
```sh
|
||||
tail -f *somefile*
|
||||
tail -f "${file}"
|
||||
```
|
||||
|
||||
See changes in a directory, as it changes:
|
||||
Watch which files in `${directory}` have most recently changed.
|
||||
|
||||
`watch -d ls *directory*`
|
||||
`watch -d ls -t ${directory}/
|
||||
|
||||
Or use the `-g` flag to exit once the output changes.
|
||||
|
||||
This command will look at whether you're connected to the internet, and turn into a rainbow once the connection hits.
|
||||
|
||||
> watch -g ip address && clear && ip address | lolcat
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: make help target
|
||||
title: Make help target
|
||||
tags:
|
||||
- system
|
||||
- make
|
||||
|
||||
Reference in New Issue
Block a user