Skip to content

Instantly share code, notes, and snippets.

Avatar
🐭
Happy Days

Jake Lacey jakelacey2012

🐭
Happy Days
View GitHub Profile
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active Sep 19, 2020
Let's Encrypt Nginx setup with Ansible
View Ansible Let's Encrypt Nginx setup
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)
@PieterScheffers
PieterScheffers / start_docker_registry.bash
Last active Sep 28, 2020
Start docker registry with letsencrypt certificates (Linux Ubuntu)
View start_docker_registry.bash
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@sebmarkbage
sebmarkbage / Enhance.js
Last active Sep 6, 2020
Higher-order Components
View Enhance.js
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@kurtmilam
kurtmilam / slenderize_flatten_javascript_object_.js
Last active Jul 31, 2018
Underscore/Lodash slenderize / flatten object mixin
View slenderize_flatten_javascript_object_.js
/* Copyright (C) 2014 Kurt Milam - http://xioup.com | Source: https://gist.github.com/kurtmilam/7006dc1c2123787f9679
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTI
@congjf
congjf / .Title
Last active Aug 27, 2020 — forked from border/mgoExample.go
Using MongoDB in golang with mgo
View .Title
Using MongoDB in golang with mgo
View JQuery Coffee Script On Scroll.js
$(window).on 'scroll':->
console.log($(window).scrollTop())
View mgoExample.go
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
You can’t perform that action at this time.