Skip to content

Instantly share code, notes, and snippets.

@carlos22
carlos22 / gogs_migrate.sh
Created February 16, 2018 13:14 — forked from senz/gogs_migrate.sh
gogs repo migration script
#!/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 git@mygitlab.com: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;
@carlos22
carlos22 / rangequery.sh
Last active September 4, 2015 13:22 — forked from jprante/rangequery.sh
Range query example
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]
},
'
@carlos22
carlos22 / spotify-admute.sh
Last active August 26, 2016 11:15 — forked from pcworld/_README.md
works with 0.9.1.55.gbdd3b79f (ubuntu 12.04 german locale)
#!/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