Skip to content

Instantly share code, notes, and snippets.

View oliveratgithub's full-sized avatar

Oliver oliveratgithub

View GitHub Profile
@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;
@hofmannsven
hofmannsven / README.md
Last active September 17, 2023 20:18
PHP and Xdebug (Notes on OS X, VVV and MAMP)
@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" />
@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.

@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);
@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

@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
@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; }
@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.
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active May 25, 2026 22:16
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents