Skip to content

Instantly share code, notes, and snippets.

View Marthym's full-sized avatar
😎

Frédéric COMBES Marthym

😎
View GitHub Profile
@manfromanotherland
manfromanotherland / formspree.html
Last active July 30, 2021 07:05
JS: Ajax send forms using the most excellent Formspree » http://formspree.io #snippet
<form id="contact-form" action="//formspree.io/your@email.com" method="post">
<input type="text" name="Name" placeholder="Name" required>
<input type="email" name="Email" placeholder="Email" required>
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea>
<!-- CONFIG -->
<input class="is-hidden" type="text" name="_gotcha">
<input type="hidden" name="_subject" value="Subject">
<input type="hidden" name="_cc" value="email@cc.com">
<!-- /CONFIG -->
<input class="submit" type="submit" value="Send">
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active April 16, 2024 16:36
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@bjaglin
bjaglin / remove-orphan-images.sh
Last active March 31, 2024 22:54
Remove orphan layers left by the "file" storage backend of the docker registry, heavily inspired by https://gist.github.com/shepmaster/53939af82a51e3aa0cd6
#!/bin/bash
set -eu
shopt -s nullglob
readonly base_dir=/var/lib/docker/registry
readonly output_dir=$(mktemp -d -t trace-images-XXXX)
readonly jq=/usr/bin/jq
readonly repository_dir=$base_dir/repositories
@Starefossen
Starefossen / tmux-cheats.md
Last active April 11, 2024 07:05
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@willurd
willurd / web-servers.md
Last active April 20, 2024 01:40
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000