Skip to content

Instantly share code, notes, and snippets.

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

Oladapo Bernard Omonayajo ragingprodigy

🏠
Working from home
View GitHub Profile
@adambom
adambom / README.md
Last active May 22, 2020 05:09
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@leommoore
leommoore / Express_Logging.md
Last active August 20, 2021 19:27
Express - Logging

#Express - Logging The express.js node.js web application framework comes with a built-in logging module called logger which is the connect.js logger. It is really handy to enable and you can use it just like any other Express module. app.use(express.logger());

Without any configuration, the logger middleware will generate a detailed log using what is called the default format. The logger actually supports four predefined log formats: default, short ,tiny, and dev. Each of these predefined formats show various amounts of detail. You can specify one of them this way:

app.use(express.logger('dev'));

If you prefer, you can customize the precise details to be logged using the the following options to format the output of the logger: