Skip to content

Instantly share code, notes, and snippets.

View mocfaisal's full-sized avatar
🔥
On Fire

Salz mocfaisal

🔥
On Fire
View GitHub Profile
@jstangroome
jstangroome / DecryptObject.sql
Created November 5, 2012 21:29
Decrypt encrypted SQL Server stored procedures.
-- Must connect to SQL Server using the Dedicate Admin Connection, eg "admin:localhost". Verified with SQL Server 2012.
-- Originally from Williams Orellana's blog: http://williamsorellana.org/2012/02/decrypt-sql-stored-procedures/
DECLARE @ObjectOwnerOrSchema NVARCHAR(128)
DECLARE @ObjectName NVARCHAR(128)
SET @ObjectOwnerOrSchema = 'dbo'
SET @ObjectName = 'PROCEDURE NAME HERE'
DECLARE @i INT
@dhonx
dhonx / update_branch_list_from_remote.sh
Created November 8, 2019 07:08
Git: Update Branch List from Remote
# Source: https://stackoverflow.com/questions/36358265/when-does-git-refresh-the-list-of-remote-branches
# To update the local list of remote branches:
git remote update origin --prune
@mocfaisal
mocfaisal / age_calculate.php
Created May 19, 2021 10:33
calculating age based on date of birth, resulting in year, month, day
<?php
// refference : https://www.w3resource.com/php-exercises/php-date-exercise-18.php
$bday = new DateTime('2021-05-18'); // Your date of birth
$today = new Datetime(date('Y-m-d'));
$diff = $today->diff($bday);
printf(' Your age : %d years, %d month, %d days', $diff->y, $diff->m, $diff->d);
printf("<br>");
printf("<br>");