Skip to content

Instantly share code, notes, and snippets.

@s4l1h
s4l1h / config.yml
Created March 6, 2023 22:36
cloudflared config file for kubernetes api server.
tunnel: xxxxx
credentials-file: /root/.cloudflared/xxxxx.json
url: https://127.0.0.1:16443
no-tls-verify: true
#micro kubernetes api server port: 16443 normally it is 6443
# we need to disable "certificate-authority-data" in .kube/config.
# when we use the kubectl port-forward we will get this error message "error: error upgrading connection: Upgrade request required"
@s4l1h
s4l1h / create.sh
Last active March 28, 2024 17:13
Kind and Istio ingress controller.
kind create cluster --config=./kind.yaml
@s4l1h
s4l1h / debian-jessie-php5.6-zts-pthreads-mongo.md
Last active May 13, 2022 15:28
Installing PHP 5.6 ZTS enabled & Composer
  1. Installing dependencies
#Date
dpkg-reconfigure tzdata
#Locales
dpkg-reconfigure locales

apt-get update
apt-get install memcached ntp
apt-get install build-essential git libssl-dev libxml2-dev libcurl4-openssl-dev autoconf libicu-dev curl
@s4l1h
s4l1h / Socks5ProxyCheck.php
Created May 28, 2012 10:01
Socks5 Proxy Checker: php ve curl ile ip:port şeklindeki listeden çalışan sock5 proxy adreslerini bulur.
<?php
error_reporting(E_ALL);
ini_set('max_execution_time',0);
# http://www.vipsocks24.com/
$list="107.10.35.178:42427
108.20.152.202:1415
110.142.196.145:43134
115.118.195.23:1080
115.252.100.245:1080
115.252.143.165:1080
@s4l1h
s4l1h / relay.py
Created November 7, 2021 12:07
Raspbery pi Relay
#!/usr/bin/python
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17, GPIO.OUT) # It does Auto set LOW and Turn Relay ON
print(GPIO.input(17))
sleep(5)
GPIO.output(17, GPIO.HIGH) # Off Relay
print(GPIO.input(17))
@s4l1h
s4l1h / install_xampp.sh
Created October 29, 2011 12:28
Install XAMPP on 64 bit linux
#/usr/bin/sh
echo "Download XAMPP"
wget http://downloads.sourceforge.net/project/xampp/BETAS/xampp-linux-1.7.7.tar.gz
echo "install ia32-libs"
sudo apt-get install ia32-libs
echo "Extrach XAMPP"
sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt
echo "install python-gtk2-dev with xampp controller panel"
sudo apt-get install python-gtk2-dev
echo "Start LAMP"
package menu
type Menu struct {
gorm.Model
Name string `json:"Name" validate:"required,min=3,max=15" conform:"trim"`
//Desc string
URL string `json:"URL" conform:"trim"` //validate:"required"
Blank bool `json:"Blank"`
Root bool `json:"Root"`
@s4l1h
s4l1h / nginx.conf
Created April 28, 2012 14:22
/etc/nginx/nginx.conf
user www-data;
worker_processes 8;
worker_rlimit_nofile 5120000;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
@s4l1h
s4l1h / Dockerfile
Last active September 19, 2019 11:41
PHP 7 zts pthreads+mongodb+redis+pdo_mysql+pdo_pgsql+mysqli+curl+opcache+composer
FROM php:7-zts
RUN apt-get update
RUN apt-get install git libssl-dev libpq-dev libcurl4-openssl-dev -y
# Install mysqli+opcache+pdo
RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql opcache curl
RUN docker-php-ext-enable mysqli pdo pdo_mysql pdo_pgsql opcache curl
# Install Redis
RUN pecl install redis
RUN docker-php-ext-enable redis
# Install mongodb
@s4l1h
s4l1h / debian-8-build-php-5.3.29.sh
Created February 28, 2017 13:39
Debian 8 (jessie) build php 5.3.29
#!/bin/bash
mkdir /opt/php-5.3.29
mkdir /usr/local/src/php5-build
cd /usr/local/src/php5-build
wget http://de.php.net/get/php-5.3.29.tar.bz2/from/this/mirror -O php-5.3.29.tar.bz2
tar jxf php-5.3.29.tar.bz2
# Thanks https://crybit.com/20-common-php-compilation-errors-and-fix-unix/
apt-get install libbz2-dev libxml2-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libc-client2007e-dev libkrb5-dev libmcrypt-dev libpq-dev libmysqlclient-dev
mkdir /usr/include/freetype2/freetype