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 [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;
@carlos22
carlos22 / SmartOSVagrantDeployZone.md
Created March 10, 2018 17:32
SmartOS Vagrant Deploy Zone

Build zone with Vagrant

Requirements

  • Vagrant
  • VirtualBox (might work with vmware)
  • node.js/npm
  • sharutils (for dz; installed on most systems)

archlinux quick install:

@carlos22
carlos22 / install-syncthing-smartos.md
Last active November 10, 2018 16:38
install syncthing on smartos
pkgin update
pkgin in syncthing
groupadd users
useradd -d /srv/syncthing -c "syncthing user" -s /usr/bin/false -g users synctg
mkdir -p /srv/syncthing
chown synctg:users /srv/syncthing
svccfg import syncthing.xml
svcadm enable syncthing
@carlos22
carlos22 / clip.sh
Last active October 11, 2018 13:11
#!/usr/bin/env bash
#OUT="$HOME/clip_$(date +%Y-%m-%d_%H-%M-%S).png"
OUT=$(mktemp -t "clip-XXXXXX.png")
xclip -selection clipboard -t image/png -o > $OUT
if [ $? -eq 0 ]; then
echo "clipboard saved to: $OUT"
nautilus $OUT
else
rm $OUT

Install MSYS2: http://www.msys2.org/

upgrade

pacman -Syu

You might need to run it again (it tells you to)

pacman -Su
#!/bin/bash
#
# Resize and send Image via Thunderbird Nautilus Script v1.0
#
# A Gnome 2 Nautilus script for resizing images from the context menu
# Written by Meinhard Benn (http://benn.org/)
# Licensed under the terms of the GNU GPLv3
###
# Configuration