Skip to content

Instantly share code, notes, and snippets.

View piotrgredowski's full-sized avatar
💻
Coding weird stuff.

Piotr piotrgredowski

💻
Coding weird stuff.
View GitHub Profile
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@joepie91
joepie91 / vpn.md
Last active July 3, 2024 18:31
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
function git_tag() {
echo -n $(git tag --points-at HEAD)
}
function git_tag_formatted() {
inside_git_repo="$(git rev-parse --is-inside-work-tree 2>/dev/null)"
if [ "$inside_git_repo" ]; then
if [ -z $(git_tag) ]; then
echo -n
else
#!/usr/bin/env python
# NOTE: Put it as your global prepare-commit-msg hook.
# Usually at `~/.git-templates/hooks/prepare-commit-msg`.
# REMEMBER to make it executable with `chmod +x ~/.git-templates/hooks/prepare-commit-msg`.
#
# After that all new repositories should have this hook installed.
# In existing repos you need to run `git init` to apply this hook.
import re