Skip to content

Instantly share code, notes, and snippets.

@back-2-95
back-2-95 / wodby.deploy.sh
Last active February 13, 2023 07:09
Wodby Slack notifier
#!/bin/bash
set -e
trap 'catch' EXIT
deploy() {
notify "start"
info "Install dependencies"
composer install --prefer-dist -n --no-dev
@ozbillwang
ozbillwang / Git_Behind_Proxy.md
Last active July 23, 2024 12:31
Configure Git to use a proxy (https or SSH+GIT)
@ethanpil
ethanpil / wp-secure.conf
Created May 12, 2017 16:16
Wordpress Security for NginX
# wp-secure.conf
#
#
# This file includes common security considerations for wordpress using nginx.
#
# The goal is to block actions which are usually dangerous to wordpress.
# Additionally, we block direct access to PHP files and folders which should not
# be accessed directly from a browser.
#
# Also have included exceptions for plugins that are known to require this access.
@ka2n
ka2n / main.go
Last active October 18, 2023 16:14
Parse yaml with dynamic key name usign go.
package main
import (
"io/ioutil"
"log"
"gopkg.in/yaml.v2"
)
type Config struct {
@Paradoxis
Paradoxis / findReplace.php
Last active March 14, 2022 13:30
Find and replace double curly braces in PHP, example: findReplace("Hello, {{ name }}", "name", "John"); // "Hello, John" Raw
<?php
/**
* Parses a template argument to the specified value
* Template variables are defined using double curly brackets: {{ [a-zA-Z] }}
* Returns the query back once the instances has been replaced
* @param string $string
* @param string $find
* @param string $replace
* @return string
@plentz
plentz / nginx.conf
Last active September 16, 2024 17:52
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048