Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 19, 2025 05:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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;
}
@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.

@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";
@refringe
refringe / sendy-server
Last active October 8, 2024 08:14
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;
@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
@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@Wysie
Wysie / gist:03934b6a79a715772abd
Last active January 7, 2025 21:32
Upload to Amazon S3 Instead of Server for Sendy Email Image Uploads
//Using S3.php from https://github.com/tpyo/amazon-s3-php-class. Place it in includes/helpers
//Replaces Sendy's includes/create/upload.php
<?php
include('../functions.php');
include('../login/auth.php');
require_once('../helpers/S3.php');
//Init
$file = $_FILES['file']['tmp_name'];
@ridem
ridem / -Shopify-Sendy.md
Last active November 18, 2023 21:41
Synchronize Shopify customers with Sendy

Synchronize Shopify customers with Sendy subscribers

Sendy woudln't be the Mailchimp killer without a proper Shopify integration. There we go, thanks to the Shopify gem and some ActiveRecord awesomeness.

NB: The script always keep in sync Shopify's accepts_marketing field with Sendy's unsubscribed field. I added custom fields like country and order count as an example of what we can do with it.

Installation

First make sure that you have the right ruby install (with rbenv for instance), with the right gems installed (like activerecord, shopify_api, etc) and the right mysql packages for the activerecord adapter;