Skip to content

Instantly share code, notes, and snippets.

Chanwit Kaewkasi chanwit

Block or report user

Report or block chanwit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Employee.java
package com.sut.sa.cpe.entity;
import lombok.*;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
View 10-my-cni-demo_node1.conf
{
"cniVersion": "0.3.1",
"name": "my-cni-demo",
"type": "my-cni-demo",
"podcidr": "10.42.0.0/24"
}
View app.yml
apiVersion: v1
kind: Service
metadata:
name: webui
spec:
selector:
app: webui
type: LoadBalancer
ports:
- name: webui
View mappings.yaml
---
apiVersion: ambassador/v1
kind: Mapping
name: productpage_v1_mapping
prefix: /app
service: https://productpage-v1-fpszyetfsa-uc.a.run.app
host_rewrite: productpage-v1-fpszyetfsa-uc.a.run.app
---
apiVersion: ambassador/v1
View module.yaml
---
apiVersion: ambassador/v1
kind: Module
name: ambassador
config:
diagnostics:
enabled: false
View CpeApplicationTests.java
package com.sut.sa.cpe;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
View istio-demo.yaml
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
istio-injection: disabled
---
# Source: istio/charts/galley/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
View service.py
from flask import Flask
from flask import request
import socket
import os
import sys
import requests
app = Flask(__name__)
TRACE_HEADERS_TO_PROPAGATE = [
View index.php
<?php
$servername = "mysql";
$username = "root";
$password = "1234";
$dbname = "test_db";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
View cstring_to_ptr.rs
extern {
fn seccomp_syscall_resolve_name_arch(arch: libc::uint32_t,
name: *const libc::c_char)
-> libc::c_int;
}
let c_str = CString::new(name).unwrap();
let result: libc::c_int = unsafe {
seccomp_syscall_resolve_name_arch(arch.to_native(), c_str.as_ptr())
};
You can’t perform that action at this time.