Skip to content

Instantly share code, notes, and snippets.

View MWins's full-sized avatar

Malcolm Winslett MWins

View GitHub Profile
@akrabat
akrabat / slim-container-examples.php
Last active April 28, 2020 08:14
Example uses of Slim 3's container
<?php
// All file paths relative to root
chdir(dirname(__DIR__));
require "vendor/autoload.php";
$settings = ['foo' => 'FOO', 'bar' => 'BAR'];
$app = new \Slim\App($settings);
// Set some things into the container
@jljohnstone
jljohnstone / index.html
Last active August 29, 2015 14:16
display a page inside of a div in another page
<!DOCTYPE html>
<html>
<head>
<title>There's a page in my div</title>
<style type="text/css">
.the-div {
border: 1px solid #555;
}
</style>
</head>
@charlesmudy
charlesmudy / index.html
Last active August 29, 2015 14:16
HTML5 complete tags for web and mobile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="google-site-verification" content="" />
<meta name="msvalidate.01" content="" />
<meta name="y_key" content="" />
<meta name="alexaverifyid" content="" />
@irazasyed
irazasyed / spintax.php
Last active February 21, 2024 17:29
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
*/
class Spintax
{
/**
* Set seed to make the spinner predictable.
*/
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/