Skip to content

Instantly share code, notes, and snippets.

View subinamathew's full-sized avatar
🏠
Working from home

subinamathew subinamathew

🏠
Working from home
View GitHub Profile
@subinamathew
subinamathew / gist:9b6cc9ce51403be911e4070695d9e4bd
Created November 14, 2023 09:24
Jenkins cURL with USERNAMEPASSWORD and Variable
pipeline {
agent {
node {
label 'master'
customWorkspace "${JENKINS_HOME}/workspace/${JOB_NAME}/${BUILD_NUMBER}"
}
}
stages {
stage('HELLO') {
steps {
function create() {
gcloud services enable cloudbilling.googleapis.com
gcloud services enable containerregistry.googleapis.com
gcloud services enable iam.googleapis.com
gcloud services enable compute.googleapis.com
gcloud services enable container.googleapis.com
gcloud services enable dns.googleapis.com
gcloud services enable sqladmin.googleapis.com
gcloud iam service-accounts create "${GKE_SA}" --display-name "${GKE_SA}"
nc localhost 5901
sudo apt-get install vnc4server
vi .vnc/xstartup
````
#!/bin/sh
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
xfce4-panel &
version: '3'
services:
database:
image: mysql
entrypoint: ['/entrypoint.sh', '--default-authentication-plugin=mysql_native_password']
environment:
- MYSQL_USER=magnolia
- MYSQL_PASSWORD=mysecretpassword
- MYSQL_DATABASE=magnolia
- MYSQL_ROOT_PASSWORD=myVerySecretPassword
@subinamathew
subinamathew / docker-start-stop.sh
Created March 16, 2021 05:12
Docker Start Stop Based on Image Name
#/bin/bash
# Args
# $1 name of the docker
# $2 command
if [ "${2}" = "start" ]
then
docker run -d -it -p 80:80 $1
fi
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
#dtoverlay=vc4-fkms-v3d
#max_framebuffers=2
[all]
package main
import (
"flag"
"log"
"net/http"
"strings"
)
// FileSystem custom file system handler
@subinamathew
subinamathew / .bash_aliases
Created July 5, 2019 22:47 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset

Install x264

cd ~
git clone git://git.videolan.org/x264
cd x264
./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
make -j4
sudo make install
@subinamathew
subinamathew / Cloud Foundry
Last active July 3, 2019 12:53
Stop all Cloud foundry apps and Delete all cloud foundry apps
*STOP ALL APPS*
cf apps | grep started | awk '{print $1}{system("cf sp " $1)}'
*REMOVE ALL APPS*
cf apps | grep stopped | awk '{print $1}{system("cf d -f -r " $1)}'
*CONNECT APPS*
cf add-network-policy frontend --destination-app backend