Skip to content

Instantly share code, notes, and snippets.

View ppartarr's full-sized avatar
🏠
Working from home

Philippe Partarrieu ppartarr

🏠
Working from home
View GitHub Profile
@ppartarr
ppartarr / multiple_rsa_keys
Created January 20, 2018 20:18
Fix multiple RSA keys problem for ssh in github
host github.com
hostname github.com
identityfile ~/.ssh/id_rsa_git
identitiesonly yes
@ppartarr
ppartarr / nginx.conf
Created February 10, 2018 12:13
Disable cache in nginx
# disable cache
add_header Last-Modified $date_gmt;
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;
@ppartarr
ppartarr / docker-clean.sh
Created June 13, 2018 10:36
♻️ Bash script to purge all containers, images, and volumes from docker
#!/bin/bash
# Stop all running containers
docker stop $(docker ps -q)
# Remove all docker containers
docker rm $(docker ps -aq)
# Remove all images
docker rmi $(docker images -q)
@ppartarr
ppartarr / video.css
Created August 14, 2018 09:59
Fullscreen embedded youtube video
#video {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
height: 105vh;
width: auto;
z-index: -1;
transform: translateX(-50%) translateY(-51%);
@ppartarr
ppartarr / curl.sh
Created August 24, 2018 16:08
Does server handle CORS preflight OPTIONS request correclty?
# This should response with a 200 OK
curl -X OPTIONS -H "Origin: http://localhost:PORT_NUMBER" -H "Access-Control-Request-Method: GET" --verbose URL
@ppartarr
ppartarr / background.css
Created September 7, 2018 09:23
White space title page with image background
// HTML
/*<div id="parent">
<div id="photo"></div>
<h1 id="title">anything</h1>
</div>*/
// CSS
#parent {
@ppartarr
ppartarr / archdualboot.md
Last active November 7, 2024 03:51
Comprehensive guide to dual boot arch & windows

Dual booting Arch linux & Windows 10

There are already dozens of tutorials to setup an Arch and Windows dual boot - welcome to a dozen + 1. Like most others this is a step by step guide. Unlike most others the steps are ordered in a way that makes sense (starting with the download first - duh!) so you won't have to restart your computer a gazillion times.

I did this on a single SSD Dell XPS 15 with windows 10 preinstalled. It's obviously possible to follow this guide if you're installing Arch onto a different drive or if you're running older hardware. If you run into any problems please be sure to read through the Arch Installation Guide and the Arch Dual boot with Windows wiki.

To get started you will need:

  • a stable internet connection
  • a USB key with 1GB storage
  • a cup of coffee & and a can do attitude
@ppartarr
ppartarr / haskell.zsh-theme
Last active May 12, 2021 07:49
zsh haskell theme
function zle-line-init zle-keymap-select {
PROMPT='%{$fg_bold[green]%}λ%{$reset_color%} %{$fg[cyan]%} %n@%m%f %D{%L:%M:%S} %{$fg[cyan]%} %~ $(git_prompt_info)%{$reset_color%} '
zle reset-prompt
}
setopt PROMPT_SUBST
zle -N zle-line-init
zle -N zle-keymap-select
@ppartarr
ppartarr / eclipse-java-style.xml
Created October 29, 2019 16:36
Eclipse Java style formatter
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="17">
<profile kind="CodeFormatterProfile" name="SpacesForTabs" version="17">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
@ppartarr
ppartarr / keybase.md
Created November 1, 2019 21:57
keybase proof

Keybase proof

I hereby claim:

  • I am ppartarr on github.
  • I am ppartarr (https://keybase.io/ppartarr) on keybase.
  • I have a public key whose fingerprint is 42ED 2574 0C90 52B7 4E89 9CC3 D803 F419 9AFF 78A3

To claim this, I am signing this object: