Skip to content

Instantly share code, notes, and snippets.

View WoodProgrammer's full-sized avatar

Emir Özbir WoodProgrammer

View GitHub Profile

User Tablosu

create table users(
id serial not null primary key,
username varchar(15) not null UNIQUE,
password text not null,
email text not null UNIQUE,
c_date timestamp default current_timestamp,full_name varchar(40) , 
status boolean not null default true,balance real not null default 0,
lastlogin timestamp not null default current_timestamp,
@WoodProgrammer
WoodProgrammer / gist:5a24116f1c366f4d2c6847fae6d59051
Created September 25, 2017 00:02 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@WoodProgrammer
WoodProgrammer / find-dead-executors.groovy
Created June 11, 2018 22:56 — forked from malonem/find-dead-executors.groovy
Jenkins script to find dead executors and remove them.
// get handle to build output
def config = new HashMap()
def bindings = getBinding()
config.putAll(bindings.getVariables())
def out = config['out']
for (aSlave in hudson.model.Hudson.instance.slaves) {
// check if executor is dead
execList = aSlave.getComputer().getExecutors()
for( exec in execList ) {
@WoodProgrammer
WoodProgrammer / docker_attach
Created October 9, 2018 16:23 — forked from miki725/docker_attach
Attach to docker container via nsenter
#!/bin/bash
USAGE="Attach to Docker Container
--------------------------
Attach to Docker Container even if the container does not run
ssh daemon. This is accomplished by using linux containers
directly via 'nsenter' (see http://bit.ly/docker_nsenter).
To install 'nsenter', just execute:
$ docker run -v /usr/local/bin:/target jpetazzo/nsenter
@WoodProgrammer
WoodProgrammer / Dockerfile
Created October 14, 2018 12:18 — forked from alexellis/Dockerfile
Go with of-watchdog
FROM golang:1.8.3-alpine3.6
RUN apk --no-cache add curl \
&& echo "Pulling watchdog binary from Github." \
&& curl -sSL https://github.com/openfaas-incubator/of-watchdog/releases/download/0.2.2/of-watchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache
WORKDIR /go/src/handler
COPY . .
@WoodProgrammer
WoodProgrammer / di_terraform.tf
Created April 5, 2019 22:41 — forked from arunvelsriram/di_terraform.tf
Terraform dependency injection style de-coupling resources
# di_terraform.tf
# Example Terraform configuration that shows de-coupling resources (Amazon S3 bucket and bucket policy)
# with the help of modules analogous to dependency injection technique
# modules/s3_bucket/main.tf
# Base S3 bucket that can be attached a policy
variable "bucket_name" {}
variable "region" {
@WoodProgrammer
WoodProgrammer / extract_kubecfg_cert.sh
Created July 25, 2021 17:28 — forked from xueshanf/extract_kubecfg_cert.sh
Extract kubernetes cluster credentials from kubecfg
#!/bin/bash
# Input: ./extract_kubecfg_cert.sh my-cluster-name username
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key
# Exit on error
abort(){
echo $1 && exit 1
}
# Prerequistes