Skip to content

Instantly share code, notes, and snippets.

@nathan130200
nathan130200 / LICENCE SUBLIME TEXT
Created November 28, 2016 12:43
Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
var express = require('express');
var app = express();
var bodyparser = require('body-parser');
var morgan = require('morgan');
app.use(bodyparser.json());
app.use(morgan('dev'));
app.get('/', function (request, response) {
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using System.Xml.Linq;
namespace FileWatcher {
@nathan130200
nathan130200 / FileDownloader.cs
Created December 17, 2017 14:32 — forked from yasirkula/FileDownloader.cs
C# Download Public File From Google Drive™ (works for large files as well)
using System;
using System.IO;
using System.Net;
public static class FileDownloader
{
private const string GOOGLE_DRIVE_DOMAIN = "drive.google.com";
private const string GOOGLE_DRIVE_DOMAIN2 = "https://drive.google.com";
// Normal example: FileDownloader.DownloadFileFromURLToPath( "http://example.com/file/download/link", @"C:\file.txt" );
@nathan130200
nathan130200 / Program.cs
Created December 26, 2017 15:45
Program.cs
using SkyLar.Config;
using System;
using System.IO;
using System.Xml.Serialization;
using SkyLar.Extensions;
using Autofac.Core;
using Autofac;
using SkyLar.Services;
namespace SkyLar
@nathan130200
nathan130200 / Program.cs
Created December 26, 2017 19:48
Program.cs
using Autofac;
using DSharpPlus;
using DSharpPlus.CommandsNext;
using DSharpPlus.Interactivity;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@nathan130200
nathan130200 / Item.cs
Created February 5, 2018 21:23
MongoDB Game Item Serialization
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
@nathan130200
nathan130200 / main.cpp
Last active February 25, 2018 01:01
OperacoesMatematicasTest
int __cdecl main(int argc, char **argv)
{
__int64 v2; // rax@1
__int64 v3; // rax@1
__int64 v4; // rax@1
__int64 v5; // rax@1
__int64 v6; // rax@1
__int64 v7; // rax@1
__int64 v8; // rax@1
int v9; // eax@8
Script.ReloadScript("scripts/gamerules/SinglePlayer.lua");
function GameRulesSetStandardFuncs(gamerules)
if (not gamerules) then
return;
end;
-- ///////// Server/Client /////////
if (not gamerules.Server) then
@nathan130200
nathan130200 / format.cs
Created August 31, 2018 15:28
C# printf function
private static string PrintF(params object[] a)
{
if (a == null || a.Length == 0) return string.Empty;
int[] i = { 1 };
string s = (a[0] is string) ? System.Text.RegularExpressions.Regex.Replace((string)a[0], "%[sdi%]",
match => match.Value == "%%" ? "%" : i[0] < a.Length ? a[i[0]++].ToString() : match.Value) : a[0].ToString();
for (; i[0] < a.Length; i[0]++)
s += " " + a[i[0]];
return s;
}