Skip to content

Instantly share code, notes, and snippets.

@bvis
bvis / Jenkinsfile
Last active January 3, 2023 20:45
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
@pdincau
pdincau / readme.md
Last active July 11, 2024 06:12
Study Path on microservices
@jathanism
jathanism / scp.py
Created August 21, 2015 00:02
Pure Python SCP library based on Twisted SSH libraries.
#!/usr/bin/env python
"""
scp.py - SCP implementation using Twisted.
This currently only uploads files to the remote host. Receiving files and
uploading directories is NYI.
Credit: http://bit.ly/1EG3eL4
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 25, 2024 13:33
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mcollina
mcollina / streams.js
Created July 2, 2015 12:30
Stream examples
var Readable = require('stream').Readable
var Writable = require('stream').Writable
var Transform = require('stream').Transform
var a = new Readable({ objectMode: true })
var b = new Transform({ objectMode: true })
var c = new Writable({ objectMode: true })
a.counter = 0
#!/bin/sh
#
# This script is used on a QNAP TS-269 PRO. https://www.en0ch.se/qnap-and-rsync/
#
# You have to change:
# 1. $SHAREUSR
# 2. $EXCLUDES (if you want o change the name of the file servername.excludes)
# 3. $SOURCE & $DESTINATION
# 4. user@yourserver.se for the mysqldump
# 5. --password=SUPERSECRET
@xingkaixin
xingkaixin / pysftp.py
Last active December 17, 2020 12:22
Python pexpect sftp sample
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pexpect import *
#import pexpect
import sys
import os
def initFile(*filenames):
#!/bin/bash
#
# Automate mysql secure installation for debian-baed systems
#
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.
@kgorman
kgorman / gist:134896c7414fde8e090b
Last active May 7, 2024 13:34
MongoDB Profiler Cheat Sheet
// a list of useful queries for profiler analysis. Starting with the most basic.
// 2.4 compatible
//
// output explained:
//
{
"ts" : ISODate("2012-09-14T16:34:00.010Z"), // date it occurred
"op" : "query", // the operation type
"ns" : "game.players", // the db and collection
@staltz
staltz / introrx.md
Last active July 25, 2024 16:52
The introduction to Reactive Programming you've been missing