Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Marvin Danig marvindanig

🎯
Focusing
Block or report user

Report or block marvindanig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marvindanig
marvindanig / .siteIgnore
Last active Oct 12, 2019
A .siteIgnore file to prevent rogue websites and nefarious interests from tracking you. Copy paste it on /etc/hosts to save yourself and the web in general.
View .siteIgnore
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
@marvindanig
marvindanig / nginx_conf.erb
Created Oct 15, 2018
nginx configuration for capistrano3-nginx ~> 3.0 gem with HSTS preload, ipv6 and http ~> https redirection
View nginx_conf.erb
upstream puma_<%= fetch(:nginx_config_name) %> { <%
@backends = [fetch(:puma_bind)].flatten.map do |m|
etype, address = /(tcp|unix|ssl):\/{1,2}(.+)/.match(m).captures
if etype == 'unix'
"server #{etype}:#{address} #{fetch(:nginx_socket_flags)};"
else
"server #{address.gsub(/0\.0\.0\.0(.+)/, "127.0.0.1\\1")} #{fetch(:nginx_http_flags)};"
end
end
%><% @backends.each do |server| %>
@marvindanig
marvindanig / cache_storage_size.js
Created Dec 16, 2017 — forked from ebidel/sw_caching_size.js
Print service worker cache sizes and overall bytes cached.
View cache_storage_size.js
/**
* @author ebidel@ (Eric Bidelman)
* License Apache-2.0
*/
// Prints the size of each cache in the Cache Storage API and the overall bytes cached.
async function getCacheStoragesAssetTotalSize() {
// Note: opaque (i.e. cross-domain, without CORS) responses in the cache will return a size of 0.
const cacheNames = await caches.keys();
@marvindanig
marvindanig / license-badges.md
Created Jun 12, 2017 — forked from lukas-h/license-badges.md
License Badges for your Project
View license-badges.md

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@marvindanig
marvindanig / doc.md
Created Aug 15, 2016 — forked from oelmekki/doc.md
Rails + Browserify + React + es7
View doc.md

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

View CSS
@import url('//fonts.googleapis.com/css?family=Source+Serif+Pro|Josefin+Sans');
body {
background: #fff;
margin: 0 0;
overflow: hidden;
color: #444;
font: 3.6vw/1.2 'Source Serif Pro', serif;
}
View HTML
<div class="leaf flex">
<div class="inner justify ">
<h1> Hello world! </h1>
<p> Lorem ipsum dolor sit amet, <a href="https://wikipedia.com">consectetur</a> adipiscing elite... </p>
</div>
</div>
@marvindanig
marvindanig / gist:10f6a4585cd9409c3afb
Last active Aug 29, 2015 — forked from ipedrazas/gist:6d6c31144636d586dcc3
How to chain PositiveSSL Certificates with Nginx
View gist:10f6a4585cd9409c3afb

The process starts by creating the CSR and the private key:

openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"

Generates

  • dotmarks.net.key
  • dotmarks.net.csr
You can’t perform that action at this time.