Skip to content

Instantly share code, notes, and snippets.

View mmphego's full-sized avatar
:octocat:
Never judge a person by their choice of IDE

Mpho Mphego mmphego

:octocat:
Never judge a person by their choice of IDE
View GitHub Profile
@mmphego
mmphego / Jenkinsfile
Created June 8, 2022 03:46 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@mmphego
mmphego / Jenkinsfile
Created June 8, 2022 03:45 — forked from jenciso/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@mmphego
mmphego / Jenkins+Script+Console.md
Created May 25, 2020 11:54 — forked from mubbashir/Jenkins+Script+Console.md
jenkins groovy scripts collection.
@mmphego
mmphego / README.md
Created April 16, 2019 08:41 — forked from akashnimare/README.md
A Beginners Guide to writing a Kickass README ✍

Project title

A little info about your project and/ or overview that explains what the project is about.

Motivation

A short description of the motivation behind the creation and maintenance of the project. This should explain why the project exists.

Build status

Build status of continus integration i.e. travis, appveyor etc. Ex. -

Build Status

@mmphego
mmphego / git-io-custom-url.md
Created January 21, 2019 15:22 — forked from hellokaton/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@mmphego
mmphego / remote_bash.sh
Created June 26, 2017 13:29 — forked from n0ts/remote_bash.sh
execute bash script from remote site
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
bash <(curl -s http://mywebsite.com/myscript.txt)
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl
curl http://foo.com/script.sh | bash -s arg1 arg2
@mmphego
mmphego / jenkins-git-backup.sh
Created May 30, 2017 03:11 — forked from abayer/jenkins-git-backup.sh
Example of a script for backing up Jenkins config in git.
#!/bin/bash
#
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
#
set -ex
if [ $# -ne 2 ]; then
echo usage: $0 root_dir jenkins_master
#!/usr/bin/env python
import paho.mqtt.client as mqtt
import RPi.GPIO as GPIO
def on_connect(client, userdata, rc):
#print ("Connected with rc: " + str(rc))
client.subscribe("kwf/demo/led")
def on_message(client, userdata, msg):