Skip to content

Instantly share code, notes, and snippets.

View vsshs's full-sized avatar

Vaidas Sirtautas vsshs

View GitHub Profile
@vsshs
vsshs / unifi-video-ubuntu-18-04.md
Created September 19, 2021 21:28 — forked from pdrok/unifi-video-ubuntu-18-04.md
Steps to install unifi-video on Ubuntu 18.04

log in as root: sudo su if you don't have MongoDB already installed:

sudo apt-get install mongodb mongodb-server openjdk-8-jre-headless=8u162-b12-1 jsvc

Open terminal (go to your apps and type in terminal, or push the windows key and type in terminal) Type the following commands:

sudo mv /usr/bin/mongod /usr/bin/mongod.bin
@vsshs
vsshs / ioc.cs
Created April 20, 2017 13:34 — forked from clausjensen/ioc.cs
private void IocRegistration(ApplicationContext applicationContext)
{
var container = new ServiceContainer();
container.RegisterControllers(typeof (UmbracoApplication).Assembly);
container.RegisterApiControllers(typeof (UmbracoApplication).Assembly);
container.RegisterControllers(typeof (Umbraco.Forms.Web.Trees.DataSourceTreeController).Assembly);
container.RegisterApiControllers(typeof (Umbraco.Forms.Web.Trees.DataSourceTreeController).Assembly);
container.RegisterControllers(typeof (Diplo.TraceLogViewer.Controllers.TraceLogTreeController).Assembly);
container.RegisterApiControllers(typeof (Diplo.TraceLogViewer.Controllers.TraceLogTreeController).Assembly);
container.RegisterControllers(typeof(Merchello.Web.Mvc.MerchelloRenderMvcController).Assembly);
@vsshs
vsshs / prepare-commit-msg.sh
Created March 2, 2017 10:00 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@vsshs
vsshs / prepare-commit-msg
Last active December 11, 2015 12:07 — forked from manderly/prepare-commit-msg
Git hook: Automatically add branch name to the end of every commit message
# Automatically adds branch name to the end of every commit message. Handy for git/JIRA integrations.
# Make a copy of .git/hooks/prepare-commit-msg.sample in your repo and name the file prepare-commit-msg (remove "sample" extension)
# Paste the following into the file, save the file, and try it out in bash
NAME=$(git branch | grep '*' | sed 's/* //')
echo $(cat "$1") " in branch: $NAME" > "$1"