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
| # Does not work with github because of https://github.com/isaacs/github/issues/554 | |
| FILE=README.md && git archive --remote=ssh://[email protected]/username/repo.git HEAD "$FILE" | tar -x "$FILE" |
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
| # Purpose: | |
| # You have remoteserver.example.com with up & running Nginx, there is a TLS cert on it. You need to serve something in your localnetwork securely to Internet. | |
| # Terminating HTTPs on remoteserver.example.com: remoteserver.example.com:443/ --proxy_pass--> http://localhost:18089/ | |
| # Target host (192.168.0.226) is in your local network (also it could be VM on your machine) behind NAT on your router (it's your gateway for network 192.168.0.0/24) | |
| # Target server runs on target host on port 8089 (192.168.0.226:8089) | |
| # | |
| # That's all. | |
| ssh -NR localhost:18089:192.168.0.226:8089 remoteserver.example.com |
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
| for file in $(find -name 'some-*-binary-name-and-version-*3.0.1-*'); do echo "========================================"; echo $file; echo "========================================"; gdb -ex "p 'runtime.buildVersion'" -ex quit $file 2>&1| grep 'str = '; done |
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
| [...$('#files').options].map(o => o.text) |
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
| find ~/work/go/ \( -name 'workspace.xml' -o -name 'misc.xml' \) -type f | xargs grep GOROOT | cut -d':' -f 1 | grep -v old_repos | xargs sed -e 's/go1.\([0-9]\+\).\([0-9]\+\)/go1.15.7/g' | grep GOROOT | |
| find ~/work/go/ \( -name 'workspace.xml' -o -name 'misc.xml' \) -type f | xargs grep GOROOT | cut -d':' -f 1 | grep -v old_repos | xargs sed -i -e 's/go1.\([0-9]\+\).\([0-9]\+\)/go1.15.7/g' |
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 bash | |
| # Released under MIT License | |
| # Copyright (c) 2020 Rodion Promyshlennikov | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is |
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
| csv = [] | |
| var rows = document.querySelectorAll("table tr"); | |
| for (var i = 0; i < rows.length; i++) { | |
| var row = [], cols = rows[i].querySelectorAll("td, th"); | |
| for (var j = 0; j < cols.length; j++) | |
| row.push(cols[j].innerText); | |
| csv.push(row.join("|")); | |
| } |
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 bash | |
| set -e | |
| xfce4-terminal -e 'env PROMPT_COMMAND="unset PROMPT_COMMAND;docker start <docker_id>" bash' | |
| xfce4-terminal --tab -T nService \ | |
| -e 'env PROMPT_COMMAND="unset PROMPT_COMMAND; cd work_dir/nService; source ../prepare_env_.sh; make build && ./nService -console" bash' \ | |
| --tab -T mService \ | |
| -e 'env PROMPT_COMMAND="unset PROMPT_COMMAND; cd work_dir/mService; source ../prepare_env_.sh; make build && ./mService -console" bash' |
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
| GRANT CONNECT ON DATABASE "db-name" TO "user-name"; | |
| \c "db-name"; -- REQUIRED!! | |
| GRANT USAGE ON SCHEMA "schema-name" TO "user-name"; | |
| GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA "schema-name" TO "user-name"; | |
| GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA "schema-name" TO "user-name"; | |
| GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA "schema-name" TO "user-name"; | |
| GRANT ALL PRIVILEGES ON DATABASE "db-name" TO "user-name"; | |
| REVOKE USAGE ON SCHEMA "schema-name" FROM "user-name"; |
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
| find /home/user/work/ -mindepth 1 -maxdepth 2 -type d -exec git -C {} fetch --all \; |
NewerOlder