Skip to content

Instantly share code, notes, and snippets.

@juancarloscruzd
juancarloscruzd / nginx.conf
Created October 1, 2016 18:29 — forked from calebwoods/nginx.conf
Sample Nginx config for deployment of Angular.js app
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
@juancarloscruzd
juancarloscruzd / Git push deployment in 7 easy steps.md
Created July 26, 2016 05:33 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@juancarloscruzd
juancarloscruzd / .gitignore
Created January 12, 2016 21:59 — forked from drblue/.gitignore
.gitignore for (local) Wordpress theme development
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# Originaly from http://ironco.de/bare-minimum-git/
# ver 20150130
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@juancarloscruzd
juancarloscruzd / gist:babce63d94716483a268
Created December 20, 2015 02:29
Remove unnecessary tags that Wordpress insert in header
<?php
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'start_post_rel_link' );
remove_action( 'wp_head', 'index_rel_link' );
remove_action( 'wp_head', 'wp_shortlink_wp_head' );
remove_action( 'wp_head', 'adjacent_posts_rel_link' );
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
@juancarloscruzd
juancarloscruzd / gist:aa5493b18888c49978fc
Last active October 26, 2015 17:06 — forked from roalcantara/gist:5490277
SCP + PEM File
eval `ssh-agent -s`
$ scp -i /path/to/file.pem /path/to/copy/foo.gz username@<some.public.host>:/target/path/
$ scp -i /path/to/file.pem username@<host>:/path/to/copy/foo.gz /target/to/paste/
scp -P 18765 -r [email protected]:~/public_html ~/
@juancarloscruzd
juancarloscruzd / app.js
Last active August 29, 2015 14:20 — forked from auser/app.js
angular.module('myApp',
['ngRoute', 'myApp.services', 'myApp.directives']
)
.config(function(AWSServiceProvider) {
AWSServiceProvider.setArn('arn:aws:iam::<ACCOUNT_ID>:role/google-web-role');
})
.config(function(StripeServiceProvider) {
StripeServiceProvider.setPublishableKey('pk_test_YOURKEY');
})
.config(function($routeProvider) {
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query
Setting up Sendy with Laravel
(there might be bugs, I striped out some parts of my code because what I have is more complicated then that, so, sorry if it's broken!)
--
I would recommand creating a database for Sendy only.
Add Sendy's database into your database.php (1)
Create the Campaign model (2), and specify that you want to use Sendy's database (Campaigns are the only thing we really need to create, other things like creating lists can be done through Sendy interface, and there is a PHP library to add subscribers)
Now, it's time to install Sendy, usually somewhere like yourapp.com/sendy or yourapp.com/newsletter