Skip to content

Instantly share code, notes, and snippets.

@abrahamfast
abrahamfast / nginx.conf
Created December 2, 2018 00:49 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@abrahamfast
abrahamfast / my.cnf
Created September 23, 2018 17:22 — forked from peerax/my.cnf
mySQL config file for ram 8GB
# my.cnf for TAKIS Server
# BEGIN CONFIG INFO
# DESCR: 8 GB RAM, InnoDB only, ACID, few connections, heavy queries
# TYPE: SYSTEM
# END CONFIG INFO
[client]
port = 7000
socket = /var/lib/mysql/mysql.sock
#!/bin/bash
#----------------------------------------
# OPTIONS
#----------------------------------------
USER='root' # MySQL User
PASSWORD='' # MySQL Password
DAYS_TO_KEEP=0 # 0 to keep forever
GZIP=1 # 1 = Compress
BACKUP_PATH='/home/itops/backups/mysql'
#----------------------------------------
@abrahamfast
abrahamfast / config_origam
Last active August 21, 2018 11:14
split tab and window in sublime
[
{ "keys": [":", "s", "p"], "command": "travel_to_pane", "args": {"direction": "up"} },
{ "keys": [":", "v", "s", "p"], "command": "travel_to_pane", "args": {"direction": "right"} },
{ "keys": [":", "b", "d"], "command": "destroy_pane", "args": {"direction": "self"} },
{ "keys": [":", "p", "z"], "command": "zoom_pane", "args": {"fraction": 1} },
{ "keys": [":", "p", "z", "d"], "command": "unzoom_pane", "args": {} },
{ "keys": [":", "p", "u"], "command": "travel_to_pane", "args": {"direction": "up"} },
{ "keys": [":", "p", "r"], "command": "travel_to_pane", "args": {"direction": "right"} },
{ "keys": [":", "p", "d"], "command": "travel_to_pane", "args": {"direction": "down"} },
{ "keys": [":", "p", "l"], "command": "travel_to_pane", "args": {"direction": "left"} }
server {
root /var/www/backend.app.snappbit.com;
index index.php index.html index.htm;
server_name backend.app.snappbit.com;
charset utf-8;
@abrahamfast
abrahamfast / install_pagespeed_nginx.sh
Created July 6, 2018 14:04 — forked from jniltinho/install_pagespeed_nginx.sh
How to Install Nginx and Google PageSpeed on Debian/Ubuntu
#!/bin/bash
## Install PageSpeed on Debian 8/9 and Ubuntu 16.04 64Bits
## https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-16-04/
## http://nginx.org/en/linux_packages.html
## https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
## https://developers.google.com/speed/pagespeed/module/
## Debian ISO: https://cdimage.debian.org/cdimage/archive/8.9.0/amd64/iso-cd/
## No Link abaixo tem o pacote do Nginx para o Debian 8 64Bits
## https://github.com/jniltinho/ispconfig/tree/master/packages/debian/jessie
## Run as root (sudo su)
@abrahamfast
abrahamfast / nginx.conf
Created February 28, 2018 06:30 — forked from mreschke/nginx.conf
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@abrahamfast
abrahamfast / application98.css
Created December 30, 2017 08:52
application98 css for light box
#codebazan-IR {
background: #fff;
position: fixed;
top: 17%;
left: 32%;
padding: 10px 1px;
text-align: center;
width: 30%;
border: 6px solid #28A9CC;
transition: .5s;
@abrahamfast
abrahamfast / fingerprint.sh
Created July 14, 2017 22:41
view your ssh public key's fingerprint
ssh-keygen -l -E md5 -f ~/.ssh/user_key.pub