Skip to content

Instantly share code, notes, and snippets.

View shawon100's full-sized avatar
🎯
Focusing

Ashadullah Shawon shawon100

🎯
Focusing
View GitHub Profile
#/bin/bash
read -p "Enter Pod Name: " pod
kubectl get po --all-namespaces | grep $pod | awk '{print $2 " -n " $1}' | xargs kubectl delete pod;
user nginx;
worker_processes auto;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 100000;
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
@shawon100
shawon100 / screenDetection.m
Created July 17, 2019 12:05
Screen Detection in a Dark Room
% Screen Detection in a Dark Room
% Developed By Ashadullah Shawon
% Software Engineer, FSMB
% Email: shawona@frontiersemi.com
im=imread('I:\Shawon\matlab\FPD\screen.JPG');
im1=rgb2gray(im);
im1=medfilt2(im1,[3 3]); %Median filtering the image to remove noise%
BWm = edge(im1,'sobel'); %finding edges MASK
%figure(2),imshow(BWm);
from itertools import combinations
items = [['A', 'C', 'D'], ['B', 'C', 'E'], ['A', 'B', 'C', 'E'], ['B', 'E']]
s = []
def apriori(lname, paramater):
second = list(combinations(lname, paramater))
# print(second)
slist = []
for l in items:
st = list(combinations(l, paramater))
@shawon100
shawon100 / openshift-cheatsheet.md
Created October 31, 2017 09:09 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet
  • Binary Builds
oc new-build --binary=true --name=ola2 --image-stream=redhat-openjdk18-openshift
oc start-build ola2 --from-file=./target/ola.jar --follow
oc new-app 
  • Turn off/on DC triggers to do a batch of changes without spam many deployments
@shawon100
shawon100 / js.md
Created August 25, 2017 08:31 — forked from nuhil/js.md
Javascript Handbook

Javascript Handbook

A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.

Comments


Single line comments start with //. For multi-line commands, you use /* ... */

// This is a single line comment
var n=100000;
var k=1;
var l,u;
var a=new Array(100000);
var p=new Array(100000);
var segment=[];
var sg=[];
#include<stdio.h>
int phi[1000006], mark[1000006];
void seivephi(int n)
{
int i, j;
for(i=1; i<=n; i++) phi[i] = i;
#include <bits/stdc++.h>
using namespace std;
vector<int>edges[1000];
queue<int>q;
int color[1000],visited[1000],tn;
int bipartite(int s)
{
int j,k,fr;
memset(color,-1,sizeof color);