Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

David Côté-Tremblay dctremblay

🎯
Focusing
Block or report user

Report or block dctremblay

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dctremblay
dctremblay / dasio-eclipse-formatter.xml
Last active Oct 14, 2019
DASIO code formatter eclipse
View dasio-eclipse-formatter.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="16">
<profile kind="CodeFormatterProfile" name="DASIO" version="16">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="separate_lines_if_wrapped"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
View gist:5aba9df746fc3c9693be16336c4429a5
formulahendry.dotnet-test-explorer
ms-vscode.csharp
jchannon.csharpextensions
pflannery.vscode-versionlens
logerfo.sln-support
jmrog.vscode-nuget-package-manager
fudge.auto-using
jongrant.csharpsortusings
@dctremblay
dctremblay / fence_sysrq_ssh
Last active Aug 22, 2019
testing fence pacemaker through ssh sysrq force reboot
View fence_sysrq_ssh
#!/bin/bash
. /dev/stdin
if [[ $action -eq 'off' ]]
then
ssh root@$nodename 'echo 1 > /proc/sys/kernel/sysrq' &&
ssh root@$nodename 'echo b > /proc/sysrq-trigger' &
fi
View tmux create 4 panes
function mux()
{
if [[ $# -eq 5 ]]
then
tmux \
split-pane -v ';' \
split-pane -h -t1 ';' \
split-pane -h -t0 ';' &&
sleep 1 &&
tmux \
@dctremblay
dctremblay / backup-b2
Last active Feb 20, 2019
basic b2 backup script
View backup-b2
#!/bin/bash
EXCLUDE_REGEX='^.*(((cache|sess).+[a-z0-9]{26,}.*)|(_log|\.log(.gz)?))$'
GLOBAL_ARGS="--skipNewer --keepDays 30 --threads 17 --excludeRegex $EXCLUDE_REGEX"
# usage example :
#
# ./backup-b2 $ACCOUNT_ID $APPLICATION_KEY << EOF
# /var/www/html b2://mybucket/mysite
# /etc/ssl b2://mybucket/mycerts
@dctremblay
dctremblay / mysql-recursive-replace-all-string-occurences.py
Created Aug 5, 2018
MySQL "recursive" replace all replace string occurrences
View mysql-recursive-replace-all-string-occurences.py
#!/usr/bin/python
# This script is under the "Do Whatever The Fuck You Want License"
class MySQLConnect():
def __init__(self, **kwargs):
import MySQLdb
self.conn = MySQLdb.connect(**kwargs)
@dctremblay
dctremblay / LabelDimensions.csv
Created Oct 12, 2017 — forked from armadsen/LabelDimensions.csv
CSV file containing dimensions information for various Avery label sheets.
View LabelDimensions.csv
labelTypeName labelSheetWidth labelSheetHeight topMargin bottomMargin leftMargin rightMargin numberOfRows numberOfColumns horizontalGutter verticalGutter
Avery 2160 Bottom 8.5 11 5.5 0.5 0.81 0.81 4 1 0 0
Avery 2160 Top 8.5 11 0.5 5.5 0.81 0.81 4 1 0 0
Avery 2162 Bottom 8.5 11 5.5 0.5 0.125 0.125 3 1 0 0
Avery 2162 Top 8.5 11 0.5 5.5 0.125 0.125 3 1 0 0
Avery 2163 Bottom 8.5 11 5.5 0.5 0.125 0.125 2 1 0 0
Avery 2163 Top 8.5 11 0.5 5.5 0.125 0.125 2 1 0 0
Avery 2164 Bottom 8.5 11 5.844 0.844 0.125 0.125 1 1 0 0
Avery 2164 Top 8.5 11 0.844 5.844 0.125 0.125 1 1 0 0
Avery 5159 8.5 11 0.25 0.25 0.156 0.156 7 2 0.188 0
View gist:12a3e60e19a077a78d570642ec0ad1c1
# install build dependencies
sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
# clone and install rbenv environment
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
View build-package-rhel.sh
#!/usr/bin/env bash
#
# Copyright (C) 2016 Savoir-faire Linux Inc.
#
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@dctremblay
dctremblay / ring-daemon_patch_fix-libuuid-sourceforce-404.diff
Created Aug 14, 2017
libuuid@ring-daemon : Change SourceForce repo to mirrorservice (SourceForce mirror caused 404 error)
View ring-daemon_patch_fix-libuuid-sourceforce-404.diff
diff --git a/contrib/src/uuid/rules.mak b/contrib/src/uuid/rules.mak
index 63f329690..17dc259e5 100644
--- a/contrib/src/uuid/rules.mak
+++ b/contrib/src/uuid/rules.mak
@@ -1,7 +1,7 @@
# libuuid part of util-linux
UUID_VERSION := 1.0.2
-UUID_URL := $(SF)/libuuid/libuuid-$(UUID_VERSION).tar.gz
+UUID_URL := https://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/libuuid-$(UUID_VERSION).tar.gz
You can’t perform that action at this time.