Skip to content

Instantly share code, notes, and snippets.

View madalinignisca's full-sized avatar
🏡
Open for business

Madalin Ignisca madalinignisca

🏡
Open for business
View GitHub Profile
@justinhartman
justinhartman / 01_nginx-reload-post-hook.sh
Last active April 30, 2024 17:18
Let's Encrypt Certbot post hook command for Nginx which checks the updated configuration files and reloads the server if everything validates.
#!/usr/bin/env bash
#
# Certbot Nginx Reload
#
# Let's Encrypt Certbot post hook command for Nginx which checks the updated
# configuration files and reloads the server if everything validates.
#
# Author : Justin Hartman <code@justinhartman.co>
# Version : 1.0.1
# License : MIT <https://opensource.org/licenses/MIT>
@jjsquady
jjsquady / nextjs-deploy.md
Last active May 23, 2024 12:55
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@Tylerian
Tylerian / ST_Epgs3857_DWithin.sql
Last active November 13, 2023 18:33
ST_DWithin function implementation for MySQL 8.0
-- Made by Jairo Tylera
-- (github.com/Tylerian)
-- (c) 2019 - present
-- Released under MIT X11 License
CREATE
DEFINER=`root`@`localhost`
FUNCTION
`ST_Epgs3857_DWithin`(p1 POINT, p2 POINT, distance_mts FLOAT)
RETURNS
@butlerblog
butlerblog / functions.php
Last active March 28, 2024 02:09
SMTP using wp-config.php for settings #smtp #wp_mail
<?php // Don't use this line.
/*
* Add the script below to wherever you store custom code snippets
* in your site, whether that's your child theme's functions.php,
* a custom plugin file, or through a code snippet plugin.
*/
/**
* This function will connect wp_mail to your authenticated
@makenova
makenova / pritunlMigration.md
Last active April 20, 2024 21:50
move pritunl between servers

Migrating your pritunl install between servers

This is a small write up about how to migrate your pritunl install between servers. It's not especially detailed because I'm lazy and your migration story will most likely be different. All this can be avoided by using a remote/hosted mongo instance(compose.io, mongolab, etc.) and simply pointing your pritunl instance at that. If you want more details ask, and I'll do my best to answer and update this write-up accordingly. Also, feel free to criticize my grammar and spelling.

#FOR MULTIPLE REDIS INSTANCE INSTALLATION ON RHEL7+ USE THE FOLLOWING PATHS AND SETUP PROCESS:

  • create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
  • edit /etc/redis-xxx.conf, illustrated as below

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@tektoh
tektoh / hhvm_php.ini
Last active August 29, 2015 14:10
Configure: Nginx+HHVM+Concrete5
; php options
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_maxlifetime = 1440
short_open_tag = On
expose_php = Off
; hhvm specific
hhvm.log.level = Warning
@hdragomir
hdragomir / sm-annotated.html
Last active March 5, 2024 08:57
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@robneu
robneu / wp-config
Created February 26, 2013 20:48
Set your GF license key in wp-config
/** Define Gravity Forms License Key */
define("GF_LICENSE_KEY", "YOUR-LICENSE-KEY-HERE");