mysqldump -v -h 127.0.0.1 -P 3306 -u root -p --default-character-set=utf8 sonar > sonar_backup.sqlmysql -u username -p database_name < backup_name.sql| #!/bin/bash | |
| # ssh-multi | |
| # D.Kovalov | |
| # Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
| # a script to ssh multiple servers over multiple tmux panes | |
| HOSTS= | |
| read_host() { |
| #!/bin/bash | |
| # Usage: | |
| # bash playsound.sh <AUDIO-FILE> | |
| BLUEZ_MAC='74:A3:4A:0F:AB:D3' | |
| get_a2dp_sink_index(){ | |
| index=$(pactl list sinks short | grep ${BLUEZ_MAC//:/_}.a2dp_sink | awk '{print $1}') | |
| echo $index |
| import java.io.IOException; | |
| import java.text.ChoiceFormat; | |
| import java.text.Format; | |
| import java.text.MessageFormat; | |
| import java.text.NumberFormat; | |
| import java.util.Locale; | |
| import java.util.ResourceBundle; | |
| public class App { |
| grep -rnwH ./ -e WIN32 | sed -e 's/\(.*\):[0-9+].*/\1/' | sort | uniq | grep -v Binary | xargs vim |
| package main | |
| // Just a sample code for learning mutex. Don't use this code for prodution. | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) |
| #!/bin/bash | |
| REPO_DIR=/tmp/my-git-repo | |
| git clone -b $SOURCE_BRANCH $SOURCE_REPO_URL $REPO_DIR && cd $REPO_DIR || exit 1 | |
| git remote add upstream $TARGET_REPO_URL && git fetch upstream $TARGET_REPO_BRANCH | |
| commit_ids=$(git cherry upstream/$TARGET_REPO_BRANCH | awk '{print $2}') | |
| cd - |
Scritps: https://github.com/fuchsia-mirror/jiri/blob/master/scripts/bootstrap_jiri
From this script we can know the download URL can be got from: https://fuchsia-build.storage.googleapis.com/
Example (end with commit id)
fx script: https://github.com/fuchsia-mirror/scripts/blob/master/fx
| func dualPivotQuickSort(arr []int, start, end int) { | |
| if start < end { | |
| lp, rp := partition(arr, start, end) | |
| dualPivotQuickSort(arr, start, lp-1) | |
| dualPivotQuickSort(arr, lp+1, rp-1) | |
| dualPivotQuickSort(arr, rp+1, end) | |
| } | |
| } | |
| // partition split the slice into three parts with two pivots: |