Skip to content

Instantly share code, notes, and snippets.

View jasperf's full-sized avatar
🏠
Working from home

Jasper Frumau jasperf

🏠
Working from home
View GitHub Profile
sudo ip -6 addr add public_ipv6_address/64 dev eth0
sudo ip -6 route add default via public_ipv6_gateway dev eth0
sudo nano /etc/network/interfaces
iface eth0 inet6 static
address primary_ipv6_address
netmask 64
gateway ipv6_gateway
autoconf 0
dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888 209.244.0.3
@jasperf
jasperf / mcnojs+customjs.html
Last active June 7, 2022 21:13
MailChimp Form without MailChimp JS + Custom JS Redirect
<div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-1">
<h4 class="title">Like What You're Reading?</h4>
<p class="text">Subscribe to our mailing list and get blog posts sent directly to your e-mail inbox.</p>
<!-- Begin MailChimp Signup Form -->
<style type="text/css">
#mc_embed_signup{background:#f47555; clear:left; font:14px Helvetica,Arial,sans-serif; }/* Add your own MailChimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */#mc_embed_signup_scroll input{ background-color: #aaaaaa;border-color: #FFFFFF !important;<br />}input#mc-embedded-subscribe.button {height:50px;}</style>
<div id="mc_embed_signup"><form id="mc-embedded-subscribe-form" class="validate" action="//ownurl.us14.list-manage.com/subscribe/post?u=5e08d0ec976ea8929c31531bc&id=72b16de3f4" method="post" name="mc-embedded-subscribe-form" novalidate="" target="_blank">
<div id="mc_embed_signup_scroll">
<div class=
@jasperf
jasperf / mcsbform.html
Created July 26, 2017 09:07
MC embedded form
<div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-1" data-thanks_page="0" data-thanks_page_url="" data-thanks_page_new_window="0">
<h4 class="title">Like What You're Reading?</h4>
<p class="text">Subscribe to our mailing list and get blog posts sent directly to your e-mail inbox.</p>
<!-- Begin MailChimp Signup Form -->
<style type="text/css">
#mc_embed_signup{background:#f47555; clear:left; font:14px Helvetica,Arial,sans-serif; }/* Add your own MailChimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */#mc_embed_signup_scroll input{ background-color: #aaaaaa;border-color: #FFFFFF !important;<br />}input#mc-embedded-subscribe.button {height:50px;}</style>
<div id="mc_embed_signup"><form id="mc-embedded-subscribe-form" class="validate" action="//publiqly.us14.list-manage.com/subscribe/post?u=5e08d0ec976ea8929c31531bc&amp;id=72b16de3f4" method="post" name="mc-embedded-subscribe
<div id="wp-subscribe" class="wp-subscribe-wrap wp-subscribe wp-subscribe-1" data-thanks_page="0" data-thanks_page_url="" data-thanks_page_new_window="0">
<h4 class="title">Like What You're Reading?</h4>
<p class="text">Subscribe to our mailing list and get blog posts sent directly to your e-mail inbox.</p>
<!-- Begin MailChimp Signup Form -->
<style type="text/css">
#mc_embed_signup{background:#f47555; clear:left; font:14px Helvetica,Arial,sans-serif; }/* Add your own MailChimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */#mc_embed_signup_scroll input{ background-color: #aaaaaa;border-color: #FFFFFF !important;<br />}input#mc-embedded-subscribe.button {height:50px;}</style>
<div id="mc_embed_signup"><form id="mc-embedded-subscribe-form" class="validate" action="//publiqly.us14.list-manage.com/subscribe/post?u=5e08d0ec976ea8929c31531bc&id=8f3f3445e1" method="post" name="mc-embedded-subscribe-form
function is_product_category( $term = '' ) {
return is_tax( 'product_cat', $term );
}
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@jasperf
jasperf / ansible-hosts-tips.md
Last active May 24, 2017 06:59
Tips on using https://github.com/jasperf/stedding playbooks to set up Laravel friendly server

Web User

Using a playbook you can do it this way:

- name: Sudo user Creation
  hosts: web
  remote_user: root
  tasks:
    - name: create sudo user
 user: name="{{base_user}}"
# {{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
# {{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
# {{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';
@jasperf
jasperf / ip-address.sh
Last active April 19, 2017 10:40
Check your external ip address from the command line + website as option to check ip address details
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
# website https://db-ip.com/
@jasperf
jasperf / Preferences.sublime-settings
Created April 18, 2017 06:35
Sublime preferences using Boxy Theme Ocean style, file icons hidden, selected tab color and line padding
{
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Ocean.tmTheme",
"font_size": 11,
"ignored_packages":
[
"Vintage"
],
"theme": "Boxy Ocean.sublime-theme",
"theme_sidebar_file_icons_hidden": true,
"theme_tab_selected_filled": true,