Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓

Arno Moonen itavero

🤓
View GitHub Profile
View uncrustify.cfg
#
# General options
#
# The type of line endings
newlines = crlf # auto/lf/crlf/cr
# The original size of tabs in the input
input_tab_size = 3 # number
@itavero
itavero / set_java_home.bat
Created Jun 14, 2016
Set JAVA_HOME on a Windows machine based on registry keys
View set_java_home.bat
@echo off
setlocal
:: Check if JAVA_HOME is already defined
IF DEFINED JAVA_HOME (exit /b 0)
:: Get the JDK version from the registry
set KEY="HKLM\SOFTWARE\JavaSoft\Java Development Kit"
set VALUE=CurrentVersion
@itavero
itavero / transmission-autoremove.sh
Created Apr 20, 2017
Transmission auto remove
View transmission-autoremove.sh
#!/usr/bin/env sh
SERVER="9091 --auth user:pass"
TORRENTLIST=`transmission-remote $SERVER --list | grep 100% | sed "s/^ *//g" | cut -w -f1`
for TORRENTID in $TORRENTLIST
do
echo "Processing $TORRENTID"
TORRENT_INFO=`transmission-remote $SERVER --torrent $TORRENTID --info`
@itavero
itavero / MvcOptionsExtensions.cs
Last active Feb 2, 2022
Global route prefix in ASP.NET Core 2.0
View MvcOptionsExtensions.cs
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Mvc.Routing;
namespace MyWebApi.Extensions
{
public static class MvcOptionsExtensions
{
public static void UseGeneralRoutePrefix(this MvcOptions opts, IRouteTemplateProvider routeAttribute)