Skip to content

Instantly share code, notes, and snippets.

View Tang8330's full-sized avatar
🎹

Robin Tang Tang8330

🎹
View GitHub Profile
@Tang8330
Tang8330 / test.java
Created March 27, 2023 04:38
Test Java PropertiesFile
package propertiesfile;
import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
public class PropertyFileReading {
public static void main(String[] args) {
Properties prop = new Properties();
try {
@Tang8330
Tang8330 / deployment.yaml
Created January 6, 2023 18:44
[Helm] Vanilla Chart
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "k8s.fullname" . }}
labels:
{{- include "k8s.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
@Tang8330
Tang8330 / run.sh
Last active August 13, 2024 11:47
Disable All Jenkins Jobs
#!/bin/bash
# Check to see if your jenkins home is in
# /var/lib/jenkins. If it isn't, then modify the script
# This will traverse through all your jobs, and disable them.
cd /var/lib/jenkins/jobs
for d in */ ; do
cd "$d"
sudo sed -i 's/disabled>false/disabled>true/' config.xml
@Tang8330
Tang8330 / mgoExample.go
Created July 18, 2017 22:21 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@Tang8330
Tang8330 / readme.md
Last active December 1, 2016 20:11
Outbound.io Privacy API Documentation

#Overview This is the specifications of how to get a Privacy API company up and running with better performance. This will also empower them to be able to have access to:

  • User Search
  • Faster Broadcast

##Specifications

  • Some SQL instance that will allow us to hold a steady DB connection via a SQL driver.
  • We should be able to connect via connection string (this will sit in Company Settings, and be available for them to edit on the Front End)
  • Outbound will only need READ-ACCESS
$('form[name=metadata]').submit(function(e) {
var _this = this;
e.preventDefault();
$.ajax({
url: _this.action,
type: _this.method,
data: $(_this).serialize(),
success: function(response) {
$(_this).fadeOut('slow');
}