Skip to content

Instantly share code, notes, and snippets.

@stefthoen
stefthoen / .gitignore
Last active December 20, 2015 16:59 — forked from redoPop/.gitignore
Gitignore for WordPress.
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins"
# and "themes" directories.
wp-content/*
!wp-content/plugins/
!wp-content/themes/
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml text/css application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
@stefthoen
stefthoen / list.php
Created November 18, 2013 16:36 — forked from rutger1140/list.php
<?php
require('config.php');
$db = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE);
$db->set_charset('utf8');
$result = $db->query('SELECT *, DATE(redirect.date) AS shortdate FROM redirect ORDER BY redirect.date DESC');
// If we have no results
if ($result && $result->num_rows < 0) die('No results');

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

<?php
namespace CoenJacobs\StefExample\PostTypes;
abstract class AbstractType {
public function setup() {
// possibly some setup logic here?
}
public function register() {
@stefthoen
stefthoen / git-tag-delete-local-and-remote.sh
Created May 7, 2020 10:02 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName