Skip to content

Instantly share code, notes, and snippets.

View JessMad's full-sized avatar
🏠
Working from home

Jesse Madriz JessMad

🏠
Working from home
View GitHub Profile
@JessMad
JessMad / Hollowing.cs
Created April 15, 2026 02:13 — forked from smgorelik/Hollowing.cs
Simple Process Hollowing C#
/***************
* Simple Process Hollowing in C#
*
* #Build Your Binaries
* c:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe Hollowing.cs /unsafe
*
* @author: Michael Gorelik <smgorelik@gmail.com>
* gist.github.com/smgorelik/9a80565d44178771abf1e4da4e2a0e75
* #Most of the code taken from here: @github: github.com/ambray
<ul>
<li ng-repeat="(key, errors) in form.$error track by $index"> <strong>{{ key }}</strong> errors
<ul>
<li ng-repeat="e in errors">{{ e.$name }} has an error: <strong>{{ key }}</strong>.</li>
</ul>
</li>
</ul>
@JessMad
JessMad / EFExtensions.cs
Created September 28, 2017 17:47 — forked from ondravondra/EFExtensions.cs
C# extension for executing upsert (MERGE SQL command) in EF with MSSQL
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace EFExtensions
@JessMad
JessMad / Kill_Process_And_Users_DB_SQLSERVER.sql
Last active March 21, 2018 20:04
SQL SERVER kill users and Process
--Set offline database and cancel the transactions running.
ALTER DATABASE <database_name> SET OFFLINE WITH ROLLBACK IMMEDIATE
-- And to bring the database online again
ALTER DATABASE <database_name> SET ONLINE
/*
* @source: http://anubhavg.wordpress.com/2009/06/11/how-to-format-datetime-date-in-sql-server-2005/
* Microsoft SQL Server T-SQL date and datetime formats
* Date time formats - mssql datetime
* MSSQL getdate returns current system date and time in standard internal format
*/
SELECT convert(varchar, getdate(), 100)
/* mon dd yyyy hh:mmAM (or PM) - Oct 2 2008 11:01AM */
SELECT convert(varchar, getdate(), 101)
/* mm/dd/yyyy - 10/02/2008 */
@JessMad
JessMad / Finder SQL SERVER.sql
Last active January 15, 2017 20:24
Find tables, procedures, functions, columns on sql server
CREATE PROCEDURE SPS_CONSULTACONTENIDOSP
@BUSCAR VARCHAR(MAX)
AS
BEGIN
--Variable que contentendrá el texto a buscar, nombre de una tabla, columna, etc...
DECLARE @SearchText AS VARCHAR(100)
SET @SearchText = @BUSCAR
--Consulta de los procedimeintos que contienen dicho texto
SELECT DISTINCT USER_NAME(o.uid) + '.' + OBJECT_NAME(c.id) AS 'Object name',
CASE
select '$'+convert(varchar(50), CAST( Total as money), -1) Total from Ventas