Skip to content

Instantly share code, notes, and snippets.

View davidalger's full-sized avatar

David Alger davidalger

View GitHub Profile
sudo sysctl -w kern.maxfilesperproc=102400
sudo sysctl -w kern.maxfiles=122880
ulimit -n 4096
@davidalger
davidalger / disable-logging.xml
Created November 6, 2017 16:33
Magento 1 - Disable logging observers
<frontend>
<events>
<controller_action_predispatch>
<observers><log><type>disabled</type></log></observers>
</controller_action_predispatch>
<controller_action_postdispatch>
<observers><log><type>disabled</type></log></observers>
</controller_action_postdispatch>
<customer_login>
<observers><log><type>disabled</type></log></observers>
<?php
return array (
'MAGE_MODE' => 'production',
'session' =>
array (
'save' => 'redis',
'redis' =>
array (
'host' => $cnf['redis_host'],
'port' => '6390',
<?php
return array (
'MAGE_MODE' => 'production',
'session' =>
array (
'save' => 'redis',
'redis' =>
array (
'host' => $cnf['redis_host'],
'port' => '6380',
<?php
return array (
'db' =>
array (
'connection' =>
array (
'indexer' =>
array (
'host' => isset($db['host']) ? $db['host'] : $db['socket'],
'dbname' => $db['database'],
@davidalger
davidalger / pfsense-setup-packet.md
Last active August 10, 2018 15:25
Install pfSense via Rescue OS on Packet Host

Install pfSense via Rescue OS on Packet Host

  1. Create t1.small.x86 server using the FreeBSD 11.1 operating system

  2. Wait for server to build and then reboot into Rescue OS and connect via SSH

  3. Write install media to disk and reboot

     curl -sO https://nyifiles.pfsense.org/mirror/downloads/pfSense-CE-memstick-serial-2.4.3-RELEASE-amd64.img.gz
    

gunzip -c pfSense-CE-memstick-serial-2.4.3-RELEASE-amd64.img.gz | dd of=/dev/sda && reboot

@davidalger
davidalger / cloud-sql-proxy.service
Created August 24, 2018 01:38 — forked from goodwill/cloud-sql-proxy.service
Example Systemd file for starting cloud sql proxy at system start
[Install]
WantedBy=multi-user.target
[Unit]
Description=Google Cloud Compute Engine SQL Proxy
Requires=networking.service
After=networking.service
[Service]
Type=simple
#file proxysql.cfg
# This config file is parsed using libconfig , and its grammar is described in:
# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-File-Grammar
# Grammar is also copied at the end of this file
datadir="/var/lib/proxysql"
FROM debian:jessie
ENV BUILD_PKG "automake bzip2 cmake make g++ gcc git-core libssl-dev patch binutils"
RUN apt-get update && apt-get install -y \
libssl1.0.0 openssl ssl-cert $BUILD_PKG \
vim mysql-client && \
cd /usr/local/src && \
git clone -b 2018-04-01 --depth 1 --single-branch https://github.com/google/re2.git && \
git clone -b v2.0.0 --depth 1 --single-branch https://github.com/sysown/proxysql.git && \
#file proxysql.cfg
# This config file is parsed using libconfig , and its grammar is described in:
# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-File-Grammar
# Grammar is also copied at the end of this file
datadir="/var/lib/proxysql"
admin_variables=
{