Skip to content

Instantly share code, notes, and snippets.

View lauhakari's full-sized avatar
🏠
Working from home

Mikko Lauhakari lauhakari

🏠
Working from home
View GitHub Profile
@lauhakari
lauhakari / Localizable.strings
Created December 10, 2023 14:50
Swedish translation for PHPMon
// MENU ITEMS (MI)
"mi_busy" = "PHP Monitor is busy...";
"mi_unsure" = "We are not sure what version of PHP you are running.";
"mi_php_version" = "Global version: PHP";
"mi_php_switch" = "Switch to PHP";
"mi_php_unsupported" = "Some installed PHP versions are not displayed.";
"mi_php_broken_1" = "Oof! It appears your PHP installation is broken...";
"mi_php_broken_2" = "Try running `php -v` in your terminal.";
"mi_php_broken_3" = "You could also try switching to another version.";
@lauhakari
lauhakari / Three Wise Monkeys.md
Created January 2, 2022 16:42 — forked from brunogirin/Three Wise Monkeys.md
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@lauhakari
lauhakari / vhost.md
Created December 6, 2021 14:48 — forked from jentanbernardus/vhost.md
Setting Up Virtual Hosts in MAMP on Windows

1. Edit MAMP Apache configuration to include Virtual Hosts configuration

In File Explorer, go to C:\MAMP\conf\apache and open httpd.conf with your text editor.

Find this line:

# Virtual hosts
# Include conf/extra/httpd-vhosts.conf

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@lauhakari
lauhakari / vertically-center-modal.css
Last active February 16, 2022 02:53
Vertically centered modal
.modal {
text-align: center;
padding: 0!important;
}
.modal:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
@lauhakari
lauhakari / Contract Killer 3.md
Created April 4, 2016 09:39 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@lauhakari
lauhakari / .gitconfig
Last active January 27, 2020 22:34
Some extra stuff to put in your .gitconfig, likes shorthand commands and aliases.
submodules[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
@lauhakari
lauhakari / .bash_prompt
Created November 19, 2015 11:05
Some colouring for your Bash. Also adds git branch and info if you're in a git folder.
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
@lauhakari
lauhakari / wp-plugin-composer.json
Created September 5, 2015 13:53
Add Wordpress plugins to composer.json file, from custom Git-repo.
/** name: on the repo is what you call later down in the "require" section.
It does not necessarily need to be the repo user and repo name, but is good practice! :)
**/
{
"repositories": [
{
"type": "composer",
"url": "http://wpackagist.org"
},
@lauhakari
lauhakari / wp-pagination-url.php
Last active December 28, 2021 01:07
Change the pagination url in Wordpress (3+) You can put in a plugin file or your functions.php.
<?php
add_action( 'init', 'my_custom_page_word' );
function my_custom_page_word() {
global $wp_rewrite; // Get the global wordpress rewrite-rules/settings
// Change the base pagination property which sets the wordpress pagination slug.
$wp_rewrite->pagination_base = "new-slug"; //where new-slug is the slug you want to use ;)
}