Skip to content

Instantly share code, notes, and snippets.

View ambroisemaupate's full-sized avatar

Ambroise Maupate ambroisemaupate

View GitHub Profile
@ambroisemaupate
ambroisemaupate / Preferences.sublime-settings
Last active February 7, 2016 10:42
Preferences.sublime-settings
{
"Seti_in_4_a_treat": true,
"Seti_rainbow": true,
"Seti_tabs_small": true,
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_bottom": 1,
"caret_extra_top": 1,
"caret_extra_width": 1,
"caret_style": "blink",
@ambroisemaupate
ambroisemaupate / security.conf
Last active April 5, 2024 14:38
Nginx CSP example
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx
@ambroisemaupate
ambroisemaupate / solr
Created September 1, 2014 16:50
Solr launch script
#!/bin/sh
### BEGIN INIT INFO
# Provides: solr
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Solr indexing server
### END INIT INFO
@ambroisemaupate
ambroisemaupate / Legal drinking age
Last active December 24, 2015 09:59
Legal drinking or selling age per country (-1: no limit, 0: alcohol forbidden)