Skip to content

Instantly share code, notes, and snippets.

View spawnrider's full-sized avatar

Yohann Ciurlik spawnrider

View GitHub Profile
@spawnrider
spawnrider / sketch_webserver_sendrf_01.ino
Created April 1, 2016 21:31
My personal Arduino Domotic program
#include <b64.h>
#include <HttpClient.h>
#include <SPI.h>
#include <Ethernet.h>
#include <RCSwitch.h>
#include <DHT.h>
// To send RF commands
RCSwitch mySwitch = RCSwitch();
@spawnrider
spawnrider / Dockerfile
Created December 8, 2017 13:50 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@spawnrider
spawnrider / steps.txt
Created March 19, 2018 14:11
Docker discovery commands
# Exemples
# Listing des utilisateurs dans C:\Users
docker run --rm -v c:/Users:/data alpine ls /data
# Pré-requis - Suppression de l'image locale
docker rmi httpd
# 1 - Récupération d'une image
# Image Docker Apache HTTPD
# https://hub.docker.com/_/httpd/
@spawnrider
spawnrider / activate_rdc.cmd
Created April 16, 2018 18:49
Activate Remote Desktop Connection using PsExec
# PSEXEC is a standalone executable file that allows you to run commands on remote machines.
# You can download the tool from here:
# http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
# Open a command line and type the follwoing:
psexec \\machinename reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
psexec \\remotecomputername netsh firewall set service remoteadmin enable
psexec \\remotecomputername netsh firewall set service remotedesktop enable
@spawnrider
spawnrider / keybase.md
Last active December 14, 2018 16:13
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements ("div.comments", commentCallbackFunction);
//--- Page-specific function to do what we want when the node is found.
function commentCallbackFunction (jNode) {
jNode.text ("This comment changed by waitForKeyElements().");
}
@spawnrider
spawnrider / index.js
Created March 15, 2022 07:47
Custom endpoints for Directus snapshot import/export
import { defineEndpoint } from '@directus/extensions-sdk';
import * as fs from 'fs';
import * as path from 'path';
import { spawn } from 'child_process';
import busboy from 'busboy';
export default defineEndpoint((router) => {
@spawnrider
spawnrider / index.md
Last active November 25, 2024 16:10
Creating a multi-domain (SAN) SSL certificate using OpenSSL

Creating a multi-domain (SAN) SSL certificate using OpenSSL

Introduction

This minimalist post is about creating a private key and a certificate signing request (CSR) for a SAN SSL certificate using OpenSSL. These commands was tested on the Mac OS command line using iTerm 2.

Generate the private key

Run the following command for generating the private key : openssl genrsa -out acme.com.key 2048

Generate the certificate signing request (CSR)

@spawnrider
spawnrider / docker-compose.yaml
Created April 20, 2022 10:32
Docker Compose for Postgis, Redis and Directus 9 stack
version: '3.9'
services:
database:
container_name: database
image: postgis/postgis:13-master
volumes:
- ./data/database:/var/lib/postgresql/data
networks:
- directus
@spawnrider
spawnrider / kv-copyer.ps1
Created May 31, 2022 15:25
Copying an Azure Key Vault using Powershell
Param(
[Parameter(Mandatory)]
[string]$sourceKvName,
[Parameter(Mandatory)]
[string]$destKvName
)
Connect-AzAccount
$secretNames = (Get-AzKeyVaultSecret -VaultName $sourceKvName).Name
$secretNames.foreach{
Set-AzKeyVaultSecret -VaultName $destKvName -Name $_ `