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
#!/usr/bin/env bash | |
## Usage: | |
## ./migrate.sh $clone_url $project_name $owner_uid | |
## Migrate a repository to gogs into the user namespace of the token-user | |
## ./migrate.sh [email protected]:group/repo.git repo 1 | |
## uid can be a group uid | |
## NB: for local migration, if your gogs instance is inside docker or vm, you must provide path local relative to container's fs | |
echo $1; |
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
curl -XDELETE 'localhost:9201/test' | |
curl -XPUT 'localhost:9201/test/data/1' -d ' | |
{ | |
"valid_start":[11,23,13,16,17,23.6], | |
"valid_end":[110,230,130,160,170,230.6] | |
}, | |
' |
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
#!/bin/bash | |
# Updated from https://gist.github.com/pcworld/3198763/#comment-857143 | |
# added launch of spotify and made it working on non-english envs (2013-10-08) | |
# works with 0.9.1.55.gbdd3b79f (ubuntu 12.04 german locale) | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # http://stackoverflow.com/a/246128 | |
was_paused=0 # if last state was paused | |
ad=0 # if an ad is probably playing right now |