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
| Getting 'Release is not valid yet' on image build ? | |
| try stop / start the podman machine | |
| ```bash | |
| podman machine stop | |
| podman machine start | |
| ``` |
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
| brew install dnsmasq | |
| echo 'address=/.test/127.0.0.1' > /opt/homebrew/etc/dnsmasq.conf | |
| sudo brew services start dnsmasq | |
| sudo mkdir -v /etc/resolver | |
| sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test' |
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
| filetype on | |
| filetype plugin on | |
| filetype indent on | |
| set number | |
| set cursorline | |
| set hlsearch | |
| set title | |
| syntax on |
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
| # Given an array of integers greater than zero, find if it is possible to | |
| # split it in two (without reordering the elements), such that the sum | |
| # of the two resulting arrays is the same. Print the resulting arrays. | |
| # In [1]: can_partition([5, 2, 3]) | |
| # Output [1]: ([5], [2, 3]) | |
| # Return [1]: True | |
| # | |
| # In [2]: can_partition([2, 3, 2, 1, 1, 1, 2, 1, 1]) | |
| # Output [2]([2, 3, 2], [1, 1, 1, 2, 1, 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
| USER=${2-myusername} | |
| PASSWORD=${3-mypassword} | |
| HOST=${4-jenkins_host} | |
| curl --user $USER:$PASSWORD\ | |
| -k \ | |
| -X POST \ | |
| -F "jenkinsfile=<$1" \ | |
| $HOST/pipeline-model-converter/validate |
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
| docker run --rm --name pg-docker -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres |
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
| /** | |
| * | |
| * @param {string} host | |
| * @param {string} path | |
| * @param {Array<[string, string]>} paramList | |
| * @returns {string} | |
| */ | |
| function createStringifiedURI(host: string, path: string, paramList: Array<[string, string]>): string { | |
| const uri = new URL( | |
| path, |
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
| python3 -m http.server |
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
| /** | |
| * creates and returns a cold observable that emits raw data read asynchronously from a File object | |
| * @param {File} file | |
| * @returns {Observable<string>} | |
| */ | |
| export function getFileRawDataAsObservable(file: File): Observable<string> { | |
| return new Observable<string>( | |
| function (observer) { | |
| const reader = new FileReader(); | |
| reader.onloadend = function(event: any) { |
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
| # assume you keep a daily backup from a database application, e.g mysql | |
| # backup filenames format is "dbname.%Y%m%d.sql" and are kept under folder named "dbname" | |
| # declare list of folder names which contain sql dumps | |
| declare -a dbList=("db1" "db2") | |
| # iterate the list | |
| for i in "${dbList[@]}" | |
| do | |
| # using find command add -delete option to delete files |
NewerOlder