Skip to content

Instantly share code, notes, and snippets.

View Sylvain-Bugat's full-sized avatar
🏭

Sylvain Bugat Sylvain-Bugat

🏭
View GitHub Profile
@mqu
mqu / README.md
Last active March 2, 2022 16:29
déchiffrement des fichiers envoyés par ENEDIS/pro chiffrés en AES/CBC-256

tags: ENEDIS, ENEDIS-pro, AES/CBC-265, java

@andre3k1
andre3k1 / install-gnu-sed-on-mac-osx.sh
Created July 26, 2018 18:39
How to install gnu sed on Mac OS X and set it as the default
# Check which version of sed is used when you run the `sed` command
# The version that ships with Mac OS X is
# /usr/bin/sed
which sed
# Install gnu-sed using Homebrew
# The `--with-default-names` option configures `sed` to use gnu-sed
# Without that option, you'll need to type `gsed` to use gnu-sed
brew install --default-names gnu-sed
@dlenski
dlenski / bagcerts
Created July 17, 2018 03:56
Add "bag attributes" to a certificate chain
#!/bin/bash
#
# This script takes one or more x509 certificates in .PEM format (from
# stdin or files listed on command line) and adds helpful "bag
# attributes" before each certificate. This makes it easier for
# humans to identify the contents of the bundle.
#
# Requires (g)awk and openssl's x509 command line utility.
#
# Output fields included can be specified via openssl-x509 options:
@iteufel
iteufel / zipcodes.germany.sql
Created September 19, 2017 11:22
German Zip codes with coordinates and names
This file has been truncated, but you can view the full file.
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.16-0ubuntu0.16.04.1)
# Generation Time: 2016-12-21 12:35:15 +0000
# ************************************************************
@cooper6581
cooper6581 / TestLogging.java
Last active October 11, 2017 17:03
LOG4J2-1311 SocketReader
package org.apache.logging.log4j;
import org.apache.logging.log4j.core.LoggerContext;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.URISyntaxException;
#
# Sample /etc/sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
##
# Override built-in defaults
##
@JJediny
JJediny / Jenkinsfile
Created February 22, 2017 20:17 — forked from abayer/Jenkinsfile
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@andkirby
andkirby / semversort.sh
Last active January 12, 2024 15:28
Semantic versions sorting in bash.
#!/usr/bin/env bash
# Download this gist
# curl -Ls https://gist.github.com/andkirby/54204328823febad9d34422427b1937b/raw/semversort.sh | bash
# And run:
# $ semversort 1.0 1.0-rc 1.0-patch 1.0-alpha
# or in GIT
# $ semversort $(git tag)
# Using pipeline:
# $ echo 1.0 1.0-rc 1.0-patch 1.0-alpha | semversort
#
@marcelog
marcelog / lambda-website-checker.js
Created October 22, 2016 12:10
This AWS Lambda can be used to check your website for availability
'use strict';
var url = require('url');
var target = 'http://www.yourwebsite.com'; // Change this one
exports.handler = function(event, context, callback) {
var urlObject = url.parse(target);
var mod = require(
urlObject.protocol.substring(0, urlObject.protocol.length - 1)
);
@Sylvain-Bugat
Sylvain-Bugat / get-npm-package-version
Last active April 14, 2017 20:19 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell / awk
# One command version using awk
PACKAGE_VERSION=$( awk -F: '$1 ~ /"version"/ { split($2,array,"\""); print array[2] ; exit }' package.json )
echo "${PACKAGE_VERSION}"