Skip to content

Instantly share code, notes, and snippets.

@pyengwoei
pyengwoei / SimpleHTTPServer.cs
Created June 6, 2019 01:57 — forked from aksakalli/SimpleHTTPServer.cs
SimpleHTTPServer in C#
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;
@niisar
niisar / Delete FILESTREAM data.sql
Created April 24, 2016 16:11
Delete FILESTREAM data
-- Delete row #1
DELETE FROM PhotoAlbum WHERE PhotoId = 1
SELECT * FROM PhotoAlbum
-- Forcing garbage collection won't delete the file without a BACKUP if using FULL recovery model
EXEC sp_filestream_force_garbage_collection
-- Switch from FULL to SIMPLE recovery model
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'PhotoLibrary'
ALTER DATABASE PhotoLibrary SET RECOVERY SIMPLE
@aksakalli
aksakalli / SimpleHTTPServer.cs
Last active June 7, 2024 08:38
SimpleHTTPServer in C#
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;