Skip to content

Instantly share code, notes, and snippets.

View oliviertoupin's full-sized avatar

Olivier Toupin oliviertoupin

  • Montréal, Canada
View GitHub Profile
@oliviertoupin
oliviertoupin / zram
Last active April 17, 2023 20:51
ZRam on Centos
#!/bin/bash
### BEGIN INIT INFO
# Provides: zram
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Virtual Swap Compressed in RAM
# Description: Virtual Swap Compressed in RAM
### END INIT INFO
@oliviertoupin
oliviertoupin / produce-markdown.sh
Created December 2, 2014 20:22
Rendering Markdown from github in a one liner, using only cURL and bash
# Rendering Markdown from github in a one liner, using only cURL and bash
{ echo "<style>h1 { text-align: left} </style>"; \
echo "<style>"; \
curl -s https://gist.githubusercontent.com/andyferra/2554919/raw/2e66cabdafe1c9a7f354aa2ebf5bc38265e638e5/github.css ; \
echo "</style>"; \
curl -s -H "Accept: application/vnd.github.v3" \
-H "Content-Type:text/x-markdown" \
-X POST --data-binary @$1 https://api.github.com/markdown/raw ; }