Skip to content

Instantly share code, notes, and snippets.

View tanandy's full-sized avatar

Andy Tan tanandy

View GitHub Profile
@tanandy
tanandy / mysqldump and mysqlpump backup.md
Created March 21, 2023 07:19 — forked from ebta/mysqldump and mysqlpump backup.md
Backup MySQL database using mysqldump & mysqlpump

Backup Using mysqldump

Mysqldump is a command-line utility that is used to generate the logical backup of the MySQL database. It produces the SQL Statements that can be used to recreate the database objects and data. The command can also be used to generate the output in the XML, delimited text, or CSV format.

Note: By default, mysqldump command does not dump the information_schema database, performance_schema, and MySQL Cluster ndbinfo database. If you want to include the information_schema tables, you must explicitly specify the name of the database in the mysqldump command, also include the —skip-lock-tables option.

mysqldump -uroot -p  --all-databases > all-databases.sql
mysqldump -uroot -p dbname > dbname.sql
mysqldump -uroot -p dbname table1 table2 > dbname_table_1_2.sql
@tanandy
tanandy / eks-kube-proxy-free.md
Created December 27, 2022 16:38 — forked from tklauser/eks-kube-proxy-free.md
Cilium kube-proxy free with XDP NodePort acceleration on EKS
@tanandy
tanandy / nginx.conf
Created June 11, 2021 16:34 — forked from johngrimes/nginx.conf
Ideal Nginx configuration for JavaScript single-page app
server {
listen 80;
root /usr/share/nginx/html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
gzip_comp_level 9;
etag on;
location / {
try_files $uri $uri/ /index.html;
}
@tanandy
tanandy / wiki.md
Created November 20, 2020 20:18 — forked from davidamidon/wiki.md
oidc-client-js Wiki

oidc-client

oidc-client is a JavaScript library intended to run in browsers (and possibly Cordova style applications). It provides protocol support for OIDC and OAuth2, as well as management functions for user sessions and access tokens management.

If you are unfamiliar with OpenID Connect, then you should learn the protocol first. This library is designed as a spec-compliant protocol library.

Basics

@tanandy
tanandy / PackerPolicy.json
Created July 22, 2019 12:55 — forked from MattSurabian/PackerPolicy.json
Minimum IAM policy required by AWS for Packer to do its thing. https://github.com/mitchellh/packer Permissions are broken out by API functionality and a resource array has been defined with a wild card for each group. For tighter security resource level permissions can be applied per this documentation: http://aws.typepad.com/aws/2013/07/resourc…
{
"Statement": [
{
"Sid": "PackerSecurityGroupAccess",
"Action": [
"ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup",
"ec2:DescribeSecurityGroups",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:RevokeSecurityGroupIngress"
package helloworld;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
@tanandy
tanandy / microservice bots.md
Created September 18, 2018 14:37 — forked from DasWolke/microservice bots.md
Microservice bots

Microservice Bots

What they are and why you should use them

Introduction

Recently more and more chatbots appear, the overall chatbot market grows and the platform for it grows as well. Today we are taking a close look at what benefits creating a microservice chatbot on Discord - (a communication platform mainly targeted at gamers) would provide.

The concepts and ideas explained in this whitepaper are geared towards bots with a bigger userbase where the limits of a usual bot style appear with a greater effect

Information about Discord itself

(If you are already proficient with the Discord API and the way a normal bot works, you may skip ahead to The Concept)

// add-jenkins-param.groovy
// Adds a parameter to all jobs on a Jenkins instance.
// The parameter is then exposed as an environment variable.
import hudson.model.*
key = 'GEM_SOURCE'
value = 'http://rubygems.delivery.puppetlabs.net'
desc = 'The Rubygems Mirror URL'
for(job in Hudson.instance.items) {