Skip to content

Instantly share code, notes, and snippets.

@manviny
manviny / letsencrypt_2020.md
Created May 5, 2020 05:58 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@manviny
manviny / seo-scraper.js
Created July 14, 2017 22:31
SEO Site Crawler
/**
* @author Eric Tucker <tucker.ericm@gmail.com>
* Written for nodejs
* requires phantomjs and nightmarejs
*
* Accessible through command line as:
* node seo-scraper.js www.YOUR-WEBSITE.com
*
*/
@manviny
manviny / app.js
Last active August 29, 2015 14:07 — 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) {
<?php
//enlace el SDK de Facebook, junto con los datos del APP(ID y secret)
require_once('src/facebook.php');
$facebook = new Facebook(array(
"appId"=>"768300403189668",
"secret"=>"b56fd624f2fba94c4eb54fdb2954a2bd"
));
//creacion de variables con los datos de la noticia sacados de processwire
<?php
// front-end form example with multiple images upload
// add new page created on the fly and adding images
$message = '';
if($input->post->submit){
// tmp upload folder for additional security
<?php
// ------------------------------ FORM Processing ---------------------------------------
$errors = null;
$success = false;
// helper function to format form errors
function showError($e){
return "<p class='error'>$e</p>";
<?php
$out = '';
// create a new form field (also field wrapper)
$form = $modules->get("InputfieldForm");
$form->action = "./";
$form->method = "post";
$form->attr("id+name",'subscribe-form');
<?php
/**
* If you want to add-on runtime hooks, validation or additional functionality to Form Builder,
* place this file in /site/templates/form-builder.inc
*
* It will be included by /site/templates/form-builder.php when present.
*
*/
<?php
/**
* If you want to add-on runtime hooks, validation or additional functionality to Form Builder,
* place this file in /site/templates/form-builder.inc
*
* It will be included by /site/templates/form-builder.php when present.
*
*/
<?php
/**
* UserWorkspaces
*
* Example module to hide page in the admin per user per page.
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT