-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
32 changed files
with
256 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14039 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
alias Sound-volume='amixer -D pulse sset Master ' | ||
summary: |- | ||
change the volume with the pront |
8 changes: 8 additions & 0 deletions
8
_data/awk_function_max_x_i_0_for_val_in_x_if_i_x_val_i_x_val_return_i_next_.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14032 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
awk 'function max(x){i=0;for(val in x){if(i<=x[val]){i=x[val];}}return i;} /^#/{next} {a[$<col_num>]=$<col_num>;next} END{maximum=max(a);print "Max = "maximum}' <file_name> | ||
summary: |- | ||
Use awk to find max and min values of a list |
8 changes: 8 additions & 0 deletions
8
_data/cat_dev_urandom_strings_grep_o_alnum_head_n_15_tr_d_n_echo.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14021 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
cat /dev/urandom | strings | grep -o '[[:alnum:]]' | head -n 15 | tr -d '\n'; echo | ||
summary: |- | ||
Generate a random alphanumeric string (works on Mac) |
8 changes: 8 additions & 0 deletions
8
_data/command_foo_bar_sudo_tee_etc_write_protected_dev_null.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14035 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
command foo bar | sudo tee /etc/write-protected > /dev/null | ||
summary: |- | ||
Redirect output to a write-protected file with sudo but without sh -c, using tee. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14038 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
compress pictures/ pictures.tar.gz | ||
summary: |- | ||
compress a file/folder to tar,zip,rar... |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14029 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
convert -delay 20 -loop 0 *.jpg myimage.gif | ||
summary: |- | ||
Create an animated gif from pictures |
8 changes: 8 additions & 0 deletions
8
_data/curl_s_ip_appspot_com_xargs_n_1_curl_s_freegeoip_net_csv_1_cut_d_f_9_.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14025 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
curl -s ip.appspot.com | xargs -n 1 curl -s "freegeoip.net/csv/$1" | cut -d ',' -f '9 10' | sed 's/,/\&lon=/g' | xargs -n 1 echo "http://api.openweathermap.org/data/2.5/weather?mode=html&lat=$1" | sed 's/ //g' | xargs -n 1 curl -s $1 | lynx -stdin -dump | ||
summary: |- | ||
What's the weather like? |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14034 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
curl whatismyip.akamai.com && echo | ||
summary: |- | ||
Get your external IP address |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14023 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
du -hsL */ | ||
summary: |- | ||
View disk usage |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14036 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
extract file.tar.gz | ||
summary: |- | ||
a function that extracts packt files |
8 changes: 8 additions & 0 deletions
8
_data/for_f_in_find_path_name_string_do_newfn_echo_f_sed_s_string_new_strin.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14046 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
for f in `find /path -name "*string*"`; do newfn=`echo "$f" | sed s/string/new_string/`; cp $f $newfn; done | ||
summary: |- | ||
Copy files with a given string to a new set of files with a different string. |
8 changes: 8 additions & 0 deletions
8
_data/git_branch_grep_v_master_sed_s_sed_s_git_branch_d_bash.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14019 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
git branch | grep -v "master" | sed 's/^[ *]*//' | sed 's/^/git branch -D /' | bash | ||
summary: |- | ||
Delete all git branches except master |
8 changes: 8 additions & 0 deletions
8
_data/git_branch_grep_v_master_sed_s_sed_s_sed_s_git_tag_archive_bash.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14018 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
git branch | grep -v "master" | sed 's/^[ *]*//' | sed 's/.*/& &/' | sed 's/^/git tag archive\//' | bash | ||
summary: |- | ||
Archive git branches in "arhive/" tags |
8 changes: 8 additions & 0 deletions
8
_data/git_rev_list_all_tail_n1_xargs_git_show_grep_v_diff_head_n1_cut_f1_3_.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14027 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
git rev-list --all|tail -n1|xargs git show|grep -v diff|head -n1|cut -f1-3 -d' ' | ||
summary: |- | ||
Find the date of the first commit in a git repository |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14037 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
gnome-open | ||
summary: |- | ||
open the default program |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14026 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
grep --include=\*.html -R "some string" . 2>/dev/null | ||
summary: |- | ||
Search recursively to find a word or phrase in certain file types, such as C code |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14030 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
hexdump -n6 -e '/1 "%02X:"' /dev/random|sed 's/:$/\n/' | ||
summary: |- | ||
Generat a Random MAC address |
8 changes: 8 additions & 0 deletions
8
_data/ifconfig_a_grep_inet_awk_print_2_cut_d_f_2_grep_v_127_0_0_1.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14043 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
ifconfig -a | grep inet | awk '{print $2}' | cut -d ":" -f 2 | grep -v 127.0.0.1 | ||
summary: |- | ||
Get non-localhost IPs from all Internet interfaces |
8 changes: 8 additions & 0 deletions
8
_data/ip_o_4_addr_show_eth0_grep_v_lo_sed_s_t_g_cut_f_4_cut_d_f1.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14048 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
ip -o -4 addr show eth0 | grep -v ": lo " | sed 's/ \+/\t/g' | cut -f 4 | cut -d\/ -f1 | ||
summary: |- | ||
Show your local ipv4 IP |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14016 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
json_xs -t yaml < foo.json > foo.yaml | ||
summary: |- | ||
Convert JSON to YAML (unicode safe) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14044 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
ls -lt | grep ^- | awk 'NR>=N {print $9}' | xargs rm -rf -i | ||
summary: |- | ||
Delete files sorted by dates. Delete all other files except latest N files. |
8 changes: 8 additions & 0 deletions
8
_data/lsof_i_n_p_grep_e_ps_aux_grep_node_grep_v_grep_awk_f_print_2_xargs_aw.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14049 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
lsof -i -n -P | grep -e "$(ps aux | grep node | grep -v grep | awk -F' ' '{print $2}' | xargs | awk -F' ' '{str = $1; for(i = 2; i < NF; i++) {str = str "\\|" $i} print str}')" | ||
summary: |- | ||
dynamically list open files for a given process name |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14031 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
pbpaste | awk ' !x[$0]++' | pbcopy | ||
summary: |- | ||
Remove duplicate lines from the current copy buffer. |
8 changes: 8 additions & 0 deletions
8
_data/postqueue_p_tail_n_2_awk_begin_rs_user_example_com_print_1_tr_d_posts.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14047 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } / user@example\.com/ { print $1 }' | tr -d '*!' | postsuper -d - | ||
summary: |- | ||
Delete specific sender in mailq |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14033 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
PS1='(\t <\w>)\nYUKI.N>' | ||
summary: |- | ||
Yuki Nagato bash promt. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14017 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
ssh [email protected] "date -s '"$(date)"'"; | ||
summary: |- | ||
Sync local machine date to remote machine over ssh |
8 changes: 8 additions & 0 deletions
8
_data/ssh_t_user_domain_com_ssh_t_user2_domain2_com_bash_l.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14045 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
ssh -t [email protected] "ssh -t [email protected] bash -l" | ||
summary: |- | ||
Multiple level ssh |
8 changes: 8 additions & 0 deletions
8
_data/sudo_gpg_refresh_keys_sudo_apt_key_update_sudo_rm_rf_var_lib_apt_list.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14024 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
sudo gpg --refresh-keys; sudo apt-key update; sudo rm -rf /var/lib/apt/{lists,lists.old}; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean all; sudo apt-get update | ||
summary: |- | ||
Clean apt-get and gpg cache and keys |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14020 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
sudo rm -rf / | ||
summary: |- | ||
Delete everything! |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14040 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
sudo service network-manager start | ||
summary: |- | ||
turn on/off wifi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14022 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
using 3 thread to download some big file | ||
summary: |- | ||
axel -a -n 3 http://somelink-to-download/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
commandlinefu_id: 14041 | ||
translator: | ||
weibo: '' | ||
hide: true | ||
command: |- | ||
xbacklight -set 100 | ||
summary: |- | ||
set screen brightness |