Skip to content

Instantly share code, notes, and snippets.

View sfrechette's full-sized avatar

Stéphane Fréchette sfrechette

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sfrechette on github.
  • I am sfrechette (https://keybase.io/sfrechette) on keybase.
  • I have a public key ASB-MuIUfjVLwAck6dWFHdyh8pjV2mSHzUesq-0z0vydrgo

To claim this, I am signing this object:

@sfrechette
sfrechette / PauseAzureSQLDataWarehouses.ps1
Last active November 27, 2018 14:39
Pause Azure SQL DataWarehouses
workflow PauseAzureSQLDataWarehouses
{
$connectionName = "AzureRunAsConnection"
try
{
# Get the connection "AzureRunAsConnection "
$servicePrincipalConnection=Get-AutomationConnection -Name $connectionName
"Logging in to Azure..."
Add-AzureRmAccount `

Keybase proof

I hereby claim:

  • I am sfrechette on github.
  • I am sfrechette (https://keybase.io/sfrechette) on keybase.
  • I have a public key ASCEwiXaUg4jEk0e6JLdul5TjV56rFXVf1G3B7z43iqqsQo

To claim this, I am signing this object:

@sfrechette
sfrechette / CraftCans.sql
Created May 16, 2017 13:04
SQL Script to create the CraftCans relational database
--Create CraftCans database
CREATE DATABASE CraftCans;
GO
USE CraftCans;
GO
/****** Object: Table [dbo].[Beer] ******/
SET ANSI_NULLS ON
GO
@sfrechette
sfrechette / TemporalTableDemo.sql
Last active October 8, 2016 04:52
T-SQL Temporal Tables Demo Script
use Sandbox
go
-- Create Employee table...
create table dbo.Employee
(
EmployeeID int not null primary key clustered,
EmployeeName nvarchar(100) not null,
JobTitle nvarchar(50) not null,
Department nvarchar(50) not null,
@sfrechette
sfrechette / meetup.cypher
Last active October 8, 2016 04:42
Sample Meetup Cypher (demo)
// Model - Meetup
create (n1:Member {id:1, name: 'Daniel'})
create (n2:Member {id:2, name: 'Stephane'})
create (n3:Member {id:3, name: 'John'})
create (n4:Member {id:4, name: 'Randy'})
create (n5:Meetup {id:5, name: 'Ottawa SQL Server User Group'})
create (n6:Meetup {id:6, name: 'Ottawa JavaScript'})
create (n7:Meetup {id:7, name: 'Ottawa Visio User Group'})
create (n8:Meetup {id:8, name: 'Ottawa Tableau User Group'})
create (n9:Meetup {id:9, name: 'Dirty Dancing Ottawa'})
@sfrechette
sfrechette / neo4j-wrapper.conf
Created April 9, 2015 00:00
UTF encoding in Neo4j
# Add following line to neo4j-wrapper.conf file, section JVM Parameters
wrapper.java.additional=-Dfile.encoding=UTF-8
@sfrechette
sfrechette / ottawa-weather-javascriptmeetup.R
Last active August 29, 2015 14:17
Ottawa weather vs. Ottawa JavaScript Meetup attendance: an R analysis
library(weatherData)
library(dplyr)
library(ggplot2)
library(gridExtra)
# Ottawa International Airport (YOW) weather data
getWeatherForYear = function(year) {
getWeatherForDate('YOW',
start_date= paste(sep='', year, '-01-01'),
end_date = paste(sep='', year, '-12-31'),
@sfrechette
sfrechette / ottawajs_events.csv
Created March 22, 2015 18:10
Ottawa JavaScript Meetup Attendance
date time event rsvps location photos
2015-02-11 18:30:00 Ottawa JavaScript Meetup 95 Adobe 7
2015-01-14 18:30:00 Ottawa JavaScript Meetup 87 Adobe 7
2014-12-10 18:30:00 Ottawa JavaScript Meetup 72 Adobe 0
2014-11-12 18:30:00 Ottawa JavaScript Meetup 114 Algonquin College 6
2014-10-08 18:30:00 Ottawa JavaScript Meetup 100 Algonquin College 6
2014-09-10 18:30:00 Ottawa JavaScript Meetup 107 Algonquin College 5
2014-08-13 18:30:00 Ottawa JavaScript Meetup 105 Mercury Lounge 1
2014-07-09 18:30:00 Ottawa JavaScript Meetup 98 Shopify Lounge 1
2014-06-18 18:30:00 Ottawa JavaScript Meetup 85 Shopify Lounge 0
@sfrechette
sfrechette / KillSyncServices
Created March 3, 2015 17:22
For installing Microsoft Office for Mac updates - Kill SyncServices
while true; do kill $(ps -ef | grep -i SyncServices | grep -v grep | awk '{print $2} '); done