Skip to content

Instantly share code, notes, and snippets.

View supunsandeeptha's full-sized avatar

Supun Sandeeptha supunsandeeptha

View GitHub Profile
JCotton1123 / Jenkinsfile
Last active February 22, 2024 09:11
Sample Jenkinsfile for Python project
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '10')) // Retain history on the last 10 builds
ansiColor('xterm') // Enable colors in terminal
timestamps() // Append timestamps to each line
timeout(time: 20, unit: 'MINUTES') // Set a timeout on the total execution time of the job
agent {
// Run this job within a Docker container built using
// contained within your projects repository. This image should include
peterforgacs /
Last active July 19, 2024 16:08
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

JensWalter / createSelfSignedCert.js
Last active July 18, 2022 07:17
generate a self signed certificate with AWS Lambda
const exec = require('child_process').exec;
const fs = require("fs");
exports.handler = function(event, context) {
console.log("creating certificate");
exec('openssl req -x509 -newkey rsa:4096 -keyout /tmp/key.pem -out /tmp/cert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=apimeister org/OU=org unit/" -days 45 -nodes', (error, stdout, stderr) => {
if (error) {
throw error;
console.log("reading certificate");
cmatskas / GitDeleteCommands.ps1
Last active September 22, 2022 07:59
Git Delete Branch commands
## Delete a remote branch
$ git push origin --delete <branch> # Git version 1.7.0 or newer
$ git push origin :<branch> # Git versions older than 1.7.0
## Delete a local branch
$ git branch --delete <branch>
$ git branch -d <branch> # Shorter version
$ git branch -D <branch> # Force delete un-merged branches
## Delete a local remote-tracking branch
debrouwere /
Created August 16, 2014 08:56
Access Google Analytics data with rauth in Python
import os
import json
from flask import Flask, request, redirect, jsonify
from rauth import OAuth2Service
niksumeiko / git.migrate
Last active July 19, 2024 21:32
Moving git repository and all its branches, tags to a new remote repository keeping commits history
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
digitaljhelms / gist:4287848
Last active July 19, 2024 03:32
Git/GitHub branching standards & conventions


Quick Legend

Description, Instructions, Notes
Instance Branch
lukaslundgren /
Created May 11, 2012 12:58
How to install python 2.7 on debian
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline5-dev libssl-dev libdb-dev
tar -xzf Python-2.7.3.tgz
cd Python-2.7.3
./configure --prefix=/usr --enable-shared
sudo make install
cd ..