Skip to content

Instantly share code, notes, and snippets.

@Stanback
Stanback / nginx.conf
Last active March 30, 2025 03:57 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@refringe
refringe / sendy-server
Last active June 16, 2025 00:40
Nginx configuration file example for Sendy (http://sendy.co/).
server {
listen 80;
listen [::]:80;
server_name domain.com;
autoindex off;
index index.php index.html;
root /srv/www/domain.com/public;
@deivisonarthur
deivisonarthur / _install.php
Created July 29, 2013 20:16
Sendy.co decript install page - remove validation domain
<?php
${"\x47LO\x42A\x4c\x53"}["\x6e\x6f\x73\x77\x66\x61\x70\x64\x67\x68z"]="\x74\x69\x6d\x65\x7a\x6fne";
${"G\x4cO\x42\x41\x4c\x53"}["\x6foi\x70\x70l"]="\x61w\x73_k\x65\x79";
${"\x47\x4cO\x42\x41\x4c\x53"}["\x63\x71\x65\x75e\x71\x78\x76"]="\x6e\x61m\x65";
${"\x47\x4cO\x42\x41\x4cS"}["w\x6e\x6a\x70\x6a\x6b\x66"]="\x725";
${"\x47\x4cOB\x41\x4cS"}["\x68\x61\x61s\x75\x79\x64\x70\x65a"]="\x723";
${"G\x4c\x4f\x42AL\x53"}["\x63\x69q\x67\x67p\x75"]="\x716";
${"\x47L\x4f\x42\x41L\x53"}["yek\x74\x6d\x74\x70"]="\x72\x36";
${"\x47L\x4fBA\x4c\x53"}["\x69\x7a\x68\x78em\x78j\x77\x68"]="\x72\x32";
${"\x47L\x4fB\x41LS"}["ico\x6ayr\x75o\x6e"]="\x72\x31";
@ajmalafif
ajmalafif / sendy.md
Created June 11, 2013 07:36
Newsletter - Sendy "Too Busy Right Now" concept

Here's the concept of the "Too busy right now" feature:

  1. Create a list, name it something like "Reminder subscribers"
  2. Create 2 custom fields, Reminder Date (Date) and Days to remind (Text)
  3. Create a 'Send on date' autoresponder .

On the frontend where you collect the user's email, you need to detect the user's timezone on the frontend using javascript (this will help → http://pellepim.bitbucket.org/jstz/).

The user will subscribe to your list with their email while passing in their email and timezone data into your backend script.

@jdevalk
jdevalk / gist:5623050
Created May 21, 2013 20:39
Redirect script sample NGINX code. Make sure this location line sits above the "location /" code in your NGINX config.
location /redirect/ {
rewrite ^/redirect/(.*)$ /redirect/index.php?id=$1 last;
}
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 3, 2025 16:10
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname