Skip to content

Instantly share code, notes, and snippets.

View thierryx96's full-sized avatar

Thierry thierryx96

View GitHub Profile
@thierryx96
thierryx96 / SQL_Patterns.sql
Last active November 28, 2017 21:48
SQL Patterns
-- Atomic exec of a script
BEGIN TRY
BEGIN TRANSACTION
...
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION;
THROW
@thierryx96
thierryx96 / KillConnections.sql
Last active February 22, 2017 23:54
MSSQL Toolbox
-- Kill connections on a db
CREATE PROCEDURE dbo.clearDBUsers
@dbName SYSNAME
AS
BEGIN
SET NOCOUNT ON
# Show list of PID - WPs
C:\Windows\System32\inetsrv>appcmd list wp
@thierryx96
thierryx96 / github-backup.ps1
Last active January 12, 2017 22:03
GitHub Helpers
$token = ""
$org = "acme"
$gitRepoUri = "https://api.github.com/orgs/$org/repos?access_token=$token"
$workdir = "C:/backup/git"
$git = "C:\Program Files\Git\cmd\git.exe"
$branches = "master","develop" # branches to zip
#$filter = "Team"; # leave empty if all repo
#restore :
# 1) go to the folder (.git)
@thierryx96
thierryx96 / VS Extensions
Created January 19, 2017 03:58
VS Studio Extensions
https://marketplace.visualstudio.com/items?itemName=MikeWard-AnnArbor.VSColorOutput
@thierryx96
thierryx96 / scala-patterns.md
Last active January 30, 2019 00:07
scala-patterns

Aux Pattern

// the trait
def foo[A, B, R](implicit foo: Foo.Aux[A, B], monoid: Monoid[R], ev: B =:= R): R = ???

// boilerplate for the Aux
DataRecord:=GetDataRecord(ElementNo);
with DataRecord do begin
if Grade>=3 then begin
if Repetition=0 then begin
Interval:=1;
Repetition:=1;
end else if Repetition=1 then begin
Interval:=6;
Repetition:=2;
@thierryx96
thierryx96 / README.md
Created February 3, 2020 10:01 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.