Skip to content

Instantly share code, notes, and snippets.

View oliveratgithub's full-sized avatar

Oliver oliveratgithub

View GitHub Profile
@fliedonion
fliedonion / !GIST file list order - summary.md
Last active April 20, 2025 11:29
Understand GIST file list order.
Summary How to control (or Understand) your GIST page's files list order.
Notice not official documentation.
@daniiiol
daniiiol / SitecoreChecks.aspx
Last active April 29, 2016 10:12 — forked from hermanussen/SitecoreChecks.aspx
This is a simple page that can be dropped into a Sitecore CM or CD server so you can easily monitor its health.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="Sitecore.ContentSearch" %>
<%@ Import Namespace="Sitecore.Data" %>
<%@ Import Namespace="Sitecore.Data.Items" %>
<script runat="server">
#region Configure actual checks here
ChecksSet ChecksRun { get; set; }
string[] Tags { get; set; }
@hermanussen
hermanussen / SitecoreChecks.aspx
Created October 3, 2015 14:37
This is a simple page that can be dropped into a Sitecore CM or CD server so you can easily monitor its health.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="Sitecore.ContentSearch" %>
<%@ Import Namespace="Sitecore.Data" %>
<%@ Import Namespace="Sitecore.Data.Items" %>
<script runat="server">
#region Configure actual checks here
@joar
joar / README.rst
Last active March 21, 2022 06:30
Using unicode in your SSID on ASUS RT-AC66U, in ASUSWRT

Using unicode in your SSID on ASUS RT-AC66U

!DANGER!

This might void your warranty. Do it on your own risk.

I'm using the 🐟 emoji character as my SSID, because I like to be special.

How I do it

@cyle
cyle / gist:de28409d8533bb1b62d2
Last active January 26, 2016 23:54
dank text parsing
// parse text to link-ify links, #hashtags, and @mentions
// input plain old text, get out the formatted text and info
// used by dankest.website and the dank platform https://github.com/cylesoft/dank
function parse_text($text) {
$home_url = 'https://dankest.website/';
$link_regex = '/\b(https?:\/\/)?(\S+)\.(\S+)\b/i';
$hashtag_regex = '/\#([^\s\#]+)/i';
$mention_regex = '/\@(\S+)/i';
$t = strip_tags($text);
$links_found = preg_match_all($link_regex, $t, $link_matches);
@indiesquidge
indiesquidge / homebrew.md
Last active March 21, 2026 11:15
How to and Best of Homebrew

Homebrew

How To

Homebrew is a package management system for OS X. You can read more about it here, or simply run

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

to install it.

@lowedown
lowedown / ViewJobs.aspx
Last active April 11, 2016 20:38
Sitecore Admin Page to show currently running Jobs
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="Sitecore.Jobs" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Running Sitecore Background Jobs</title>
<meta http-equiv="refresh" content="3" />
@hofmannsven
hofmannsven / README.md
Last active September 17, 2023 20:18
PHP and Xdebug (Notes on OS X, VVV and MAMP)
@clnmcgrw
clnmcgrw / gist:9086505
Last active November 25, 2021 11:16
Google Maps API Geocode Example - PHP/JSON
<?php
// address to map
$map_address = "";
$url = "http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=".urlencode($map_address);
$lat_long = get_object_vars(json_decode(file_get_contents($url)));
// pick out what we need (lat,lng)
$lat_long = $lat_long['results'][0]->geometry->location->lat . "," . $lat_long['results'][0]->geometry->location->lng;
@ryansechrest
ryansechrest / php-style-guide.md
Last active June 17, 2026 10:17
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts