Skip to content

Instantly share code, notes, and snippets.

View Amoenus's full-sized avatar

Romans Pokrovskis Amoenus

View GitHub Profile
@Amoenus
Amoenus / Example.cs
Last active February 8, 2018 15:26
NiceEnumDescription Example use
using System.Collections.Generic;
using System.Windows;
using Amoenus.NiceEnumDescription;
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
shutdown -r -t 0
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#IfWinActive ahk_class ConsoleWindowClass
^V::
Send !{space}
Send e
Send p
@echo off
cd C:\Development\D2
echo Getting latest changes for D2.
"%PathToIde%\TF.exe" get $/DEV/Development/D2 /recursive
echo Update script completed.
pause
@ECHO OFF
PowerShell.exe -Command "get-process | where { $_.Name -like '*notepad*' } | foreach { $_.Kill() }"
pause
@Amoenus
Amoenus / apply master.bat
Created April 3, 2017 10:39
SQL Plus script runner
@echo off
echo Setting credentials
set user_name=USERNAME
echo User Name: %user_name%
set password=PASSWORD
echo Password: %password%
set net_service_name=DATABASESID
echo SID: %net_service_name%
echo running master.sql script
(
@Amoenus
Amoenus / SingleOrArrayConverter.cs
Created April 26, 2017 14:48
SingleOrArrayConverter
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace SomeNameSpace
{
public class SingleOrArrayConverter<T> : JsonConverter
{
git config --global alias.squash '!f(){ git reset --soft HEAD~${1} && git commit --edit -m"$(git log --format=%B --reverse HEAD..HEAD@{1})"; };f'
UsoClient StartScan
UsoClient StartDownload
UsoClient StartInstall
wuauclt /detectnow /updatenow

Keybase proof

I hereby claim:

  • I am amoenus on github.
  • I am amoenus (https://keybase.io/amoenus) on keybase.
  • I have a public key ASAasL2hdt3sRwPJ58DnfEY3ePbUWC3mZcSORrAXd6Sg2Qo

To claim this, I am signing this object: