Skip to content

Instantly share code, notes, and snippets.

View schuhwerk's full-sized avatar

Vitus Schuhwerk schuhwerk

View GitHub Profile
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>KISD - offline</title>
<meta name="description" content="KISD - Maintainance">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto:300" rel="stylesheet">
<style type="text/css">
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
<FilesMatch "\.(?:sql|bak)$"><br>
Order allow,deny<br>
Deny from all<br>
</FilesMatch>
<style>body {word-wrap: break-word;line-height: 4px;}</style>
<?php
$myDb = array (
0 => "localhost", //host
1 => "root", //username
2 => "", //pass
3 => "citybike", //dbname
);
$mytable = 'table1';
@schuhwerk
schuhwerk / regGit.php
Last active July 10, 2018 06:59
Add to wordpress theme's functions.php thanks to http://interconnectit.com/3920/embed-all-the-gists/ Usage: Paste a gist link into a blog post or page and it will be embedded eg: https://gist.github.com/2926827 If a gist has multiple files you can select one using a url in the following format: https://gist.github.com/2926827?file=embed-gist.php
wp_embed_register_handler( 'gist', '/https?:\/\/gist\.github\.com(\/[^\/]+)?\/([a-z0-9]+)(\?file=.*)?/i', 'wp_embed_handler_gist' );
function wp_embed_handler_gist( $matches, $attr, $url, $rawattr ) {
$embed = sprintf(
'<script src="https://gist.github.com/%1$s.js%2$s"></script>',
esc_attr($matches[2]),
esc_attr($matches[3])
);