Skip to content

Instantly share code, notes, and snippets.

@Yarith
Yarith / Article - Animate removed DOM elements.md
Last active Oct 17, 2021
Elm: Animate the removal of DOM elements with CustomElement and MutationObserver
View Article - Animate removed DOM elements.md

Elm: Animate the removal of DOM elements with CustomElement and MutationObserver

Desired result

You can see the end result in this ellie. It displays a smooth removal of the clicked items. You can also remove some items from the beginning or the end.

Version 1

https://ellie-app.com/cvCV93KgD56a1

Version 2

An updated ellie with improved performance. This gist was not yet updated with all changes made in this version. Only the article text is somewhat updated.

@dabit3
dabit3 / SingleTableAppSync.md
Last active Jan 1, 2022
GraphQL Single Table Design with DynamoDB and AWS AppSync
View SingleTableAppSync.md

GraphQL

GraphQL Schema

type Customer {
  id: ID!
  email: String!
}
@cheeaun
cheeaun / rdrc2016.md
Last active Jun 13, 2018
RedDotRubyConf 2016 links & resources 😘
View rdrc2016.md
View first_to_finish.rb
module Enumerable
def first_to_finish
threads = collect { |args| Thread.new { yield(args) } }
loop until done = threads.detect { |t| !t.alive? }
threads.each(&:kill)
done.value
end
end
puts [5, 3, 1, 2, 4].first_to_finish { |x| sleep x }
@mauvm
mauvm / Jasmine-and-Babel6.md
Created Nov 12, 2015
Jasmine ES6 run script for use with Babel 6
View Jasmine-and-Babel6.md
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine

.babelrc:

{
  "presets": ["es2015"]
@regeda
regeda / underscore.go
Last active Dec 12, 2018
Convert CamelCase to underscore in golang with UTF-8 support.
View underscore.go
package main
import (
"testing"
"unicode"
"unicode/utf8"
"github.com/stretchr/testify/assert"
)
View DigitalOcean + OpenVPN + Docker.md

How To Run OpenVPN in a Docker Container

Introduction

This tutorial will explain how to setup and run an OpenVPN container with the help of Docker.

OpenVPN provides a way to create virtual private networks (VPNs) using TLS (evolution of SSL) encryption. OpenVPN protects the network traffic from eavesdropping and man-in-the-middle (MITM) attacks. The private network can be used to securely connect a device, such as a laptop or mobile phone running on an insecure WiFi network, to a remote server that then relays the traffic to the Internet. Private networks can also be used to securely connect devices to each other over the Internet.

Docker provides a way to encapsulate the OpenVPN server process and configuration data so that it is more easily managed. The Docker OpenVPN image is prebuilt and includes all of the necessary dependencies to run the server in a sane and stable environment. Scripts are included to significantly autom

@cheeaun
cheeaun / rdrc2014.md
Last active Aug 29, 2015
RedDotRubyConf 2014 links & resources
View rdrc2014.md
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active Jan 28, 2022
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Jan 27, 2022
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: