Skip to content

Instantly share code, notes, and snippets.

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)
# Create the project directory
# This will hold both the Bedrock and Trellis installs
mkdir $1
cd $1 && git init && cd ..
# Install Roots Bedrock
echo -e "\033[33;36m Installing Bedrock via Composer into $1/site ...";
composer create-project roots/bedrock $1/site
@vesper8
vesper8 / default.conf
Created July 6, 2018 03:17
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;
@vesper8
vesper8 / default.nginx.conf
Created October 7, 2018 09:10 — forked from jjhiew/default.nginx.conf
Nginx configuration to setup SSL Termination and Reverse Proxy for Sendgrid Link Tracking
# Should go into `/etc/nginx/sites-available` as file named `default`
# Redirect HTTP to HTTPS
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
@vesper8
vesper8 / led-burn-fix.html
Last active December 20, 2023 05:09
Fullscreen HTML LED stuck pixel / burn-in fixer, inspired by jscreenfix
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<style>
html,
body {
padding: 0;
@vesper8
vesper8 / Dockerfile
Created May 13, 2019 19:38 — forked from oze4/Dockerfile
Dockerfile / traefik.toml / docker-compose.yml
FROM node:lts-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:stable-alpine
COPY --from=build-stage /app/dist /usr/share/nginx/html
# this isn't necessary - you don't have to expose a port here
@vesper8
vesper8 / gist:1831aa1a59765349a9b1dd29a36ca035
Created August 21, 2019 08:18 — forked from rtrouton/gist:2ca6f001b3cecb5037825c7f9d2e422e
Xcode iOS simulator download URLs (as of Xcode 8.3.1)
iOS 10.2 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_2-10.2.1.1484185528.dmg
iOS 10.1 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_1-10.1.1.1476902849.dmg
iOS 10.0 Simulator: https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_0-10.0.1.1474488730.dmg
iOS 9.3 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg
iOS 9.2 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_2-9.2.1.1451951473.dmg
iOS 9.1 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_1-9.1.1.1446593668.dmg
iOS 9.0 Simulator: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_0-9.0.1.1443554484.dmg
iOS 8.4 Simulator: https://devimages.a

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  4. You will get a message like this:
@vesper8
vesper8 / LICENCE SUBLIME TEXT 3 BUILD 3207
Created September 16, 2019 07:16
LICENCE SUBLIME TEXT 3 BUILD 3200
LICENCE SUBLIME TEXT 3 BUILD 3207
it's work
Block these in nano /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 sublimetext.com
127.0.0.1 sublimehq.com
127.0.0.1 license.sublimehq.com
127.0.0.1 45.55.255.55
127.0.0.1 45.55.41.223
@vesper8
vesper8 / nginx.conf
Created October 10, 2019 10:37 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;