Skip to content

Instantly share code, notes, and snippets.

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

B. Safe boriphuth

🏠
Working from home
View GitHub Profile
@boriphuth
boriphuth / gist:cdbe706af91f41f67a9c45be9eaa5269
Created January 30, 2018 08:59
Convert Number and Array pair sum to given
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
//https://codeworldtechnology.wordpress.com/2017/01/07/find-all-pair-of-array-of-integers-whose-sum-is-equal-to-a-given-number-in-c/
class Program
@boriphuth
boriphuth / docker-compose.yml
Created May 29, 2019 07:49
docker-compose mongodb replica
version: "3"
services:
mongo1:
hostname: mongo1
container_name: localmongo1
image: mongo:4.0-xenial
expose:
- 27017
ports:
- 27011:27017
@boriphuth
boriphuth / README.md
Created July 12, 2019 09:01 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


using System;
using System.Collections.Generic;
using System.Linq;
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
var set = new HashSet<int>(A);
foreach (int a in A){
if (a > 0) {
using System;
using System.Collections.Generic;
using System.Linq;
class Solution {
public int solution(int N) {
string bin = Convert.ToString(N, 2);
//Console.WriteLine(bin);
int gap = 0;
int maxGap = 0 ;
@boriphuth
boriphuth / install_nodejs_and_yarn_homebrew.md
Created December 19, 2019 04:50 — forked from nijicha/install_nodejs_and_yarn_homebrew.md
Install NVM, Node.js, Yarn via Homebrew
@boriphuth
boriphuth / kubectl-delete_all
Created January 25, 2020 07:05 — forked from superbrothers/kubectl-delete_all
Kubernetes: Delete all objects in the namespace
kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all
@boriphuth
boriphuth / deployment.yaml
Created July 28, 2020 08:48
Kubernetes deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
minReadySeconds: 10
replicas: 1
selector:
matchLabels:
name: app
apiVersion: v1
kind: Service
metadata:
name: entry-point
spec:
ports:
- port: 80
targetPort: 8080
type: NodePort
selector: