Skip to content

Instantly share code, notes, and snippets.

View ardabeyazoglu's full-sized avatar

Arda Beyazoğlu ardabeyazoglu

  • Ljubljana, Slovenia
View GitHub Profile
@ada10fl2
ada10fl2 / git-php-deploy.php
Last active December 13, 2020 17:57
Getting PHP Git Deploy script to work on Windows
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
$l_git = "/c/Program Files (x86)/Git/bin/git";
$l_sshadd = "/c/Program Files (x86)/Git/bin/ssh-add";
$w_agent = "C:\\Program Files (x86)\\Git\\bin\\ssh-agent.exe";
$w_bash = "C:\\Program Files (x86)\\Git\\bin\\bash.exe";
$l_cmd = "'\"$l_sshadd\" /c/Users/myuser/.ssh/deploy; "
. "cd /c/xampp/htdocs; "
@armetiz
armetiz / 01_1_wkhtmltopdf_dependencies.config
Created May 7, 2019 14:21
wkhtmltox-0.12.5-1 AWS ElasticBeanstalk AMI 2018.03
packages:
yum:
zlib: []
fontconfig: []
freetype: []
libX11: []
libXext: []
libXrender: []
xorg-x11-fonts-75dpi: []
xorg-x11-fonts-Type1: []
@leommoore
leommoore / mongodb_3.2.x_logging.md
Last active July 4, 2021 10:51
MongoDB 3.2.x Logging

MongoDB 3.2.x Logging

The main log file is the mongod.log. You can specify the log file location when you are starting the mongod process but if you have installed on Ubuntu from a package then you log file will normally be located in /var/log/mongodb/mongod.log.

You can tail the log file using:

tail -f /var/log/mongodb/mongod.log

From the Mongo shell you can also view the log file using:

show logs

@bmeck
bmeck / Readme.md
Created April 3, 2012 15:02
Simple Vertical Load Balancing for TCP in Node.js

About

This is the most basic example of vertical scaling by transferring connections to workers, rather than sharing server sockets. It was presented at JSConf US 2012. With this you can create some interesting balancing algorithms that cluster would defer to internal/OS logic.

Exercises

A good first project when working with this is to implement sticky sessions based upon connection.remoteAddress and/or connection.remotePort.

A good advanced project is to change from a TCP based balancer to a HTTP(S) one and balance based upon not just connection.remoteAddress etc. but also on the protocol and/or Host header.

@Jabolcnik
Jabolcnik / README.md
Last active November 17, 2022 22:27
wkhtmltopdf centos 7 headless with xvfb

wkhtmltopdf centos 7 headless with xvfb

Install and run standalone Xvfb

yum install xorg-x11-server-Xvfb
yum install xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
rpm -ivh wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
@escapedcat
escapedcat / README.md
Last active December 17, 2022 07:42
Tutorial: Cordova iOS build with fastlane, match and Jenkins

Cordova CI with Jenkins for iOS apps

Inspired by CI server on Mac OS for iOS using GitLab and Fastlane by @v_shevchyk we decided to write down our approach. This will be extended and improved over time.

So you want to deploy your Cordova app, but you hate opening xcode manually to archive and export and sign and cry? Try this. By this we mean we try to explain how to create the following CI (Jenkins) setup:

  • Build Cordova app
  • Create & sign your ipa file
  • Upload to HockeyApp (for Enterprise distribution)
@bdwyertech
bdwyertech / xtrabackup_runner.sh
Created December 20, 2017 02:58 — forked from piotr-gbyliczek/xtrabackup_runner.sh
A fancier mysql backup script for Xtrabackup:
#!/bin/bash
# Script to create full and incremental backups (for all databases on server) using innobackupex from Percona.
# http://www.percona.com/doc/percona-xtrabackup/innobackupex/innobackupex_script.html
#
# (C)2017 Piotr Gbyliczek (p.gbyliczek at node4.co.uk)
# - changed to use build in compression mechanism
# - corrected restore process (restore from mixed compressed and uncompressed incrementals is supported as well)
# - tidied up script a bit and added new checks
# - removed unneeded xbstream usage (useful only for network transfers, not compatible with incremental backups)
@someburner
someburner / le2018.md
Last active September 19, 2023 09:02 — forked from cecilemuller/letsencrypt_2020.md
Let's Encrypt + wildcards for Nginx (Ubuntu 17.10, IPv6, HTTP/2, Proxy-Pass, SLL Rating=A)

Let's Encrypt for Nginx on Ubuntu 17.10, 18.04 with wildcards

Guide info:

  • we're setting up mydomain.com, *.mydomain.com
  • HTML is served from /var/www/mydomain
  • Challenges are served from /var/www/letsencrypt.
  • As of this writing, SSL Labs gives it an A+
  • Took info from here and here on wilcard certs.

Auto-renewal

@jmfederico
jmfederico / run-xtrabackup.sh
Last active February 6, 2024 08:52
Script to create full/incremental backups with xtrabackup.
#!/bin/sh
TMPFILE="/tmp/xtrabackup-runner.$$.tmp"
USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}"
BACKDIR=/srv/mysql-bak
BASEBACKDIR=$BACKDIR/base
INCRBACKDIR=$BACKDIR/incr
FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds
KEEP=1 # Number of additional backups cycles a backup should kept for.
START=`date +%s`
@voluntas
voluntas / sysctl.conf
Created October 14, 2017 13:07 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2