Skip to content

Instantly share code, notes, and snippets.

View vddgil's full-sized avatar

Gil Vandendriessche vddgil

  • Scribe
  • Belgium
  • 09:12 (UTC +02:00)
View GitHub Profile
@vddgil
vddgil / nodenv-system-wide-install
Last active November 19, 2022 19:15 — forked from markkanof/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu to /opt/rbenv
# Install nodenv
git clone https://github.com/nodenv/nodenv.git /opt/nodenv
# Add nodenv to the path:
echo '# nodenv setup' > /etc/profile.d/nodenv.sh
echo 'export NODENV_ROOT=/opt/nodenv' >> /etc/profile.d/nodenv.sh
echo 'export PATH="$NODENV_ROOT/bin:$PATH"' >> /etc/profile.d/nodenv.sh
echo 'eval "$(nodenv init -)"' >> /etc/profile.d/nodenv.sh
chmod +x /etc/profile.d/nodenv.sh
algoliasearch per_environment: true, enqueue: true, index_name: "emails" do
attributes :id, :email, :co_worker_id, :primary
attribute(:account_id) { co_worker.account_id }
attribute(:have_department) { department_id.present? }
attribute :attributes do
co_worker_attribute_values.map do |v|
{ slug: v.co_worker_attribute.slug, value: v.value }
end
import { getOutlookSignatureRawHtml } from "requests/signature";
function onMessageComposeHandler(event) {
getOutlookSignatureRawHtml().then((response) => {
Office.context.mailbox.item.body.setSignatureAsync(
response.data.raw_html,
{
"coercionType": "html",
"asyncContext": event
},
@vddgil
vddgil / gist:352d3808a76ed19348612a07e2c3f165
Created October 13, 2018 12:21
CustomWindowCovering.js
'use strict';
// Position state:
// Characteristic.PositionState.DECREASING = 0;
// Characteristic.PositionState.INCREASING = 1;
// Characteristic.PositionState.STOPPED = 2;
var HandlerPattern = require('/usr/local/lib/node_modules/homebridge-knx/lib/addins/handlerpattern.js');
var log = require('/usr/local/lib/node_modules/homebridge/node_modules/debug')('CustomWindowCovering');
@vddgil
vddgil / gist:81891785e8ee918d19a7
Last active August 29, 2015 14:21
passenger-status --show=requests
Version : 5.0.8
Date : 2015-05-22 08:47:24 +0200
Instance: qGxnHldt (nginx/1.6.3 Phusion_Passenger/5.0.8)
{
"thread1" : {
"active_client_count" : 16,
"active_clients" : {
"1-29" : {
"connected_at" : {
@vddgil
vddgil / gist:14521b7f812fb26294c5
Created May 22, 2015 06:57
Passenger status command output
Version : 5.0.8
Date : 2015-05-22 08:47:10 +0200
Instance: qGxnHldt (nginx/1.6.3 Phusion_Passenger/5.0.8)
----------- General information -----------
Max pool size : 5
Processes : 5
Requests in top-level queue : 0
----------- Application groups -----------
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
/opt/nginx/logs/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate