Skip to content

Instantly share code, notes, and snippets.

View sylvainmetayer's full-sized avatar

Sylvain METAYER sylvainmetayer

View GitHub Profile
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@cvan
cvan / HOWTO.md
Last active February 27, 2025 14:41
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@subfuzion
subfuzion / curl.md
Last active April 13, 2025 10:00
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@denis-bz
denis-bz / firefox-cookies.py
Created January 15, 2016 10:28
List Firefox cookies, in python
#!/usr/bin/env python
''' In: a firefox cookies.sqlite file
default $HOME/Library/Application\ Support/Firefox/Profiles/*/cookies.sqlite
Out: urls in the file, one per line on stdout
modified https://linuxfreelancer.com/decoding-firefox-cookies-sqlite-cookies-viewer
'''
# google python sqlite3 "delete cookies" ? looks mttiw
@Chocobozzz
Chocobozzz / gist:b19c45d0bec218dec3d5
Created August 21, 2015 18:00
sendmail-complain.conf
# Fail2Ban configuration file
#
# Author: Russell Odom <[email protected]>
# Adapted for sendmail by: Mike A. Leonetti
# Sends a complaint e-mail to addresses listed in the whois record for an
# offending IP address.
#
# You should provide the <logpath> in the jail config - lines from the log
# matching the given IP address will be provided in the complaint as evidence.
#
@Maumagnaguagno
Maumagnaguagno / .travis.yml
Last active February 18, 2020 00:02
Make Travis-CI push files to other repositories for you when tests pass
language: ruby
rvm:
- 2.0.0
env:
global:
- USER="username"
- EMAIL="[email protected]"
- REPO="name of target repo"
- FILES="README.md foo.txt bar.txt"
- GH_REPO="github.com/${USER}/${REPO}.git"
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 14, 2025 05:03
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@khanov
khanov / Binary Tree Printer.swift
Last active July 14, 2021 02:17
Binary Tree ASCII Printer
import Foundation
// Ideally Node should be a struct.
// However Swift doesn't allow recursive value types at the moment.
class Node {
var left, right: Node?
var value: String
init(value: String = "") {
@lukecathie
lukecathie / jekyll-sort-collection-desc
Created December 18, 2014 09:36
Jekyll sort collections by date desc
{% assign work_items = site.work_items | sort: 'date' | reverse %}
{% for work_item in work_items limit:4 %}
<div>
<a href="{{ work_item.url | prepend: site.baseurl }}">{{ work_item.title }}</a>
</div>
{% endfor %}
@willprice
willprice / .travis.yml
Last active June 15, 2024 04:29
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env: