Skip to content

Instantly share code, notes, and snippets.

View emreberber's full-sized avatar
🤷‍♂️

Emre Berber emreberber

🤷‍♂️
View GitHub Profile
@mhulse
mhulse / am_script2.py
Created December 13, 2012 20:48
Simple Python accessors (@getter/@Setter and @deleter) example/test using mixin and decorators... I'm using Python 2.6 for testing.
import pprint
# pprint.pprint(dir(obj))
# pprint.pprint(list)
# $ python manage.py runscript am_script2
class BaseMixin(object):
#----------------------------------
# Init:
@sayz
sayz / 0_user-accounts.md
Created August 7, 2011 11:51
linux sistem yönetimi kampında tuttuğum notlar...

##useradd komutu.

-c "açıklama"

ex: -c "müdür bey"

-s kabukı-adı

ex:

@f9n
f9n / kube-cluster-merger.sh
Last active August 10, 2021 20:24
Kube Cluster Merger
#!/usr/bin/env bash
DIRPATH=$1
OUTFILE=$2
if [ -z "$1" ]; then
DIRPATH="$HOME/.kube/clusters"
fi
if [ -z "$2" ]; then
OUTFILE="$HOME/.kube/config"
@jakemmarsh
jakemmarsh / binarySearchTree.py
Last active September 26, 2022 18:06
a simple implementation of a Binary Search Tree in Python
class Node:
def __init__(self, val):
self.val = val
self.leftChild = None
self.rightChild = None
def get(self):
return self.val
def set(self, val):
@PhilipSchmid
PhilipSchmid / ubuntu-1804-lacp-bonding.md
Last active January 31, 2023 20:48
Ubuntu 18.04 LACP Network Interface Bonding

Interface bonding

Configure a LACP active network interface bonding on Ubuntu 18.04 using netplan:

root@srv01:~# mv /etc/netplan/50-cloud-init.yaml /etc/netplan/01-netcfg.yaml
root@srv01:~# cat /etc/netplan/01-netcfg.yaml 
network:
    version: 2
    renderer: networkd
 ethernets:
@omeinusch
omeinusch / create-mysql.bash
Created August 31, 2013 11:50
Simple bash script to create mysql db, user with generated password
#!/bin/bash
PASS=`pwgen -s 40 1`
mysql -uroot <<MYSQL_SCRIPT
CREATE DATABASE $1;
CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS';
GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
@petitviolet
petitviolet / nginx_deployment.yaml
Created March 11, 2018 11:04
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@jcavat
jcavat / Dockerfile
Last active February 25, 2024 13:58
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@GAS85
GAS85 / apache_ssl.md
Last active March 14, 2024 16:40
Apache 2.4.18+ with Letsencrypt on Ubuntu 20.04 - SSL config for A+ on SSLLabs.com

Prerequisites

  • Ubuntu 20.04 (18.04, 16.04 works the same)
  • Apache 2.4.18 or higher
  • OpenSSL 1.0.2g-1ubuntu4.10 or higher
  • e.g. LetsEncrypt certificate
OS: Ubuntu 20.04 Apache/2.4.18 1.0.2g-1ubuntu4.10 +