Skip to content

Instantly share code, notes, and snippets.

@allenbrooks55
allenbrooks55 / # Vuex 4 -> Vue3 & TS.md
Created March 4, 2021 20:16 — forked from luna-koury/# Vuex 4 -> Vue3 & TS.md
Vuex 4 - Boilerplate Typescript

Vuex 4 boilerplate using Vue3 and typed modules with TypeScript

With Modules

📦src
 ┣ 📂store
 ┃ ┣ 📂modules
 ┃ ┃ ┗ 📂generic_module
 ┃ ┃ ┃ ┣ 📜actions.ts
 ┃ ┃ ┃ ┣ 📜getters.ts
 ┃ ┃ ┃ ┣ 📜index.ts
@allenbrooks55
allenbrooks55 / dropallstoredprocs_safe.sql
Created March 27, 2019 16:57
Drops all stored procedures in a given SQL Server database.
CREATE Procedure [dbo].[DeleteAllProcedures]
AS
DECLARE @schemaName varchar(500)
DECLARE @procName varchar(500)
DECLARE cur cursor
FOR SELECT s.Name, p.Name FROM sys.procedures p
INNER JOIN sys.schemas s ON p.schema_id = s.schema_id
WHERE p.type = 'P' AND is_ms_shipped = 0 AND p.name NOT LIKE 'sp[_]%diagram%'
ORDER BY s.Name, p.Name
OPEN cur
@allenbrooks55
allenbrooks55 / CRON
Created June 8, 2018 12:56
A collection of useful CRON snippets. Helpful hint, when used in Azure, these will be in UTC, not EDT/EST. {second} {minute} {hour} {day} {month} {day of the week}
0 * * * * * every minute
0 */5 * * * * every 5 minutes
0 0 * * * * every hour (hourly)
0 0 */6 * * * every 6 hours
0 0 8-18 * * * every hour between 8-18
@allenbrooks55
allenbrooks55 / MultipartFormUpload.cs
Last active March 12, 2018 19:39 — forked from bgrins/gist:1789787
C# Multipart File Upload
// Implements multipart/form-data POST in C# http://www.ietf.org/rfc/rfc2388.txt
// http://www.briangrinstead.com/blog/multipart-form-post-in-c
public static class FormUpload
{
private static readonly Encoding encoding = Encoding.UTF8;
public static HttpWebResponse MultipartFormDataPost(string postUrl, string userAgent, Dictionary<string, object> postParameters)
{
string formDataBoundary = String.Format("----------{0:N}", Guid.NewGuid());
string contentType = "multipart/form-data; boundary=" + formDataBoundary;