A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| # Download latest archlinux bootstrap package, see https://www.archlinux.org/download/ | |
| wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz' | |
| # Make sure you'll have enough entropy for pacman-key later. | |
| apt-get install haveged | |
| # Install the arch bootstrap image in a tmpfs. | |
| mount -t tmpfs none /mnt | |
| cd /mnt | |
| tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1 |
This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!
Please refer to the link above to get access to our updated API documentation and examples.
The state of Meld on Macs is currently in flux. TLDR: currently, the best
way to run Meld is to install Homebrew and then run
brew install dehesselle-meld.
Update 2025-04-21: Starting today, it seems that Homebrew renamed the
dehesselle-meld cask to just meld, https://formulae.brew.sh/cask/meld.
So, brew install --cask meld should work (possibly after updating
Homebrew), and simple brew install meld might work too.
| # Installation on Dell XPS | |
| # Please also consult official docu: | |
| # https://wiki.archlinux.org/index.php/Installation_Guide | |
| # https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360) | |
| # https://wiki.archlinux.org/index.php/Dell_XPS_15_(9550) | |
| # Boot from the usb. | |
| # F12 to enter boot menu | |
| # Connect to Internet |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
| #!/usr/bin/env bash | |
| # REF: https://github.com/cloudflare/cfssl | |
| # Change working directory | |
| cd -- "$( | |
| dirname "${0}" | |
| )" || exit 1 | |
| readonly CA_ROOT_CERT_KEY="ca-root" |