Skip to content

Instantly share code, notes, and snippets.

View earth3300's full-sized avatar

Earth3300 earth3300

View GitHub Profile
@earth3300
earth3300 / index.php
Last active September 21, 2018 20:45
A single file that lists the media files in a given directory. Can also be used as a WordPress plugin.
<?php
/**
* EC01 Media Index.
*
* Allows media (images, video and audio) to be viewed in a directory through a
* single index file.
*
* @package EC01 Media Index
* @since 1.0.0
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active November 19, 2025 04:31
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@ctlusto
ctlusto / index.html
Last active January 12, 2019 14:02
An interactive exponential population model using Desmos
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="//cdn.jsdelivr.net/semantic-ui/2.2.6/semantic.min.css">
<link rel="stylesheet" href="scrubber.css">
<link rel="stylesheet" href="main.css">
<script src="//www.desmos.com/api/v0.8/calculator.js?apiKey=dcb31709b452b1cf9dc26972add0fda6"></script>
<!-- Load jQuery from Desmos instead of pulling in another copy -->
<script>window.jQuery = window.$ = Desmos.$</script>
<script src="//cdn.jsdelivr.net/semantic-ui/2.2.6/semantic.min.js"></script>
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active April 6, 2025 09:16
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@apisandipas
apisandipas / _html_entities.scss
Created January 14, 2014 16:02
HTML Entities map - The pseudo-element 'content' property doesnt accept normal (&raquo;) style HTML entities. These variables below easy the pain of looking up the HEX codes...
/**
* The pseudo-element 'content' property doesnt accept normal (&raquo;) style
* HTML entities. These variables below easy the pain of looking up the HEX codes...
*
* Referenced from http://www.danshort.com/HTMLentities/
*
* TODO: Add all the other entities? Worth it? Some day? Maybe?
*/
// Punctuation
@Vheissu
Vheissu / .htaccess
Created February 20, 2013 23:33
W3 Total Cache .htaccess rules for caching
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
AddType text/css .css
AddType text/x-component .htc
AddType application/x-javascript .js
AddType application/javascript .js2
AddType text/javascript .js3
AddType text/x-js .js4
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
@wesrice
wesrice / gist:2378760
Created April 13, 2012 17:49
My default wp-config.php and why WP_UPLOAD_PATH and WP_UPLOAD_URL are logical constants
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@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/
@ivorisoutdoors
ivorisoutdoors / mysql.php
Created August 30, 2011 18:00
Simple PHP MySQL Class
<?php
class Mysql{
static private $link = null;
static private $info = array(
'last_query' => null,
'num_rows' => null,
'insert_id' => null
);