Skip to content

Instantly share code, notes, and snippets.

View nobitagamer's full-sized avatar

Nguyen Khac Trieu nobitagamer

View GitHub Profile
@nobitagamer
nobitagamer / NhJsonCacheSerializer.cs
Created January 29, 2016 10:13 — forked from TheCloudlessSky/NhJsonCacheSerializer.cs
JSON.NET implementation of ICacheSerializer for NHibernate.Caches.Redis
public class NhJsonCacheSerializer : ICacheSerializer
{
// By default, JSON.NET will always use Int64/Double when deserializing numbers
// since there isn't an easy way to detect the proper number size. However,
// because NHibernate does casting to the correct number type, it will fail.
// Adding the type to the serialize object is what the "TypeNameHandling.All"
// option does except that it doesn't include numbers.
private class KeepNumberTypesConverter : JsonConverter
{
// We shouldn't have to account for Nullable<T> because the serializer
@nobitagamer
nobitagamer / gist:d0f116e5fc68f92dba5c
Created January 22, 2016 08:35 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <[email protected]>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@nobitagamer
nobitagamer / JSRat.ps1
Created January 3, 2016 16:21
Fileless JavaScript Reverse HTTP Shell
<#
Author: Casey Smith @subTee
License: BSD3-Clause
.SYNOPSIS
Simple Reverse Shell over HTTP. Execute Commands on Client.