Skip to content

Instantly share code, notes, and snippets.

View oliveratgithub's full-sized avatar

Oliver oliveratgithub

View GitHub Profile
@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);
@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" />
@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; }
@hombreDelPez
hombreDelPez / ActiveReminders.ps1
Created August 10, 2016 16:20
Sitecore PowerShell script to list all active reminders
<#
.SYNOPSIS
Lists the set reminders of all content elements.
.NOTES
Manuel Fischer
#>
function Get-AllItemsWithReminders {
Get-ChildItem -Path $homeFolder -Recurse | IsReminderSet
@oneup
oneup / q3_autoexec.cfg
Created July 15, 2009 21:15
widescreen quake 3 is nicer , also GL_NEAREST
// Quake 3
// config for iMac 2.4 GHz Core 2 Duo
// custom aspect ratio for 1680x1050 wide-screen
//
seta r_mode "-1"
seta r_fullscreen "1"
seta r_customheight "1050"
seta r_customwidth "1680"
@ArturT
ArturT / Fix OpenSSL Padding Oracle vulnerability (CVE-2016-2107) - Ubuntu 14.04
Last active June 20, 2018 11:46
Fix OpenSSL Padding Oracle vulnerability (CVE-2016-2107) - Ubuntu 14.04
# Based on http://fearby.com/article/update-openssl-on-a-digital-ocean-vm/
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ wget ftp://ftp.openssl.org/source/openssl-1.0.2h.tar.gz
$ tar -xvzf openssl-1.0.2h.tar.gz
$ cd openssl-1.0.2h
$ ./config --prefix=/usr/
$ make depend
@oliveratgithub
oliveratgithub / mamp-sql-dump-import.sh
Last active April 24, 2019 09:51
MAMP MySQL dump import using Terminal.app in macOS
$ cd /Applications/MAMP/Library/bin/
$ ./mysql --host=localhost -uroot -proot target_database < ~/Desktop/database_name-dump.sql
@oliveratgithub
oliveratgithub / MailMergeSaveEachRecordToFile.vba
Created May 9, 2017 20:31
VBA macro for Microsoft Word (Mac + Windows) to Mail Merge each record into separate documents. Execute the following VBA Macro on your Office Word Mail Merge template to have Word generate & save every record into a single file. More information: https://swissmacuser.ch/microsoft-word-mail-merge-into-single-documents/
'More information & instructions:
'https://swissmacuser.ch/microsoft-word-mail-merge-into-single-documents/
Option Explicit
Sub MailMergeSaveEachRecordToFile()
'
' Save each single Mail Merge Record into a seperate Document
'
Dim rec, lastRecord As Integer
Dim docNameField, strDocName, savePath As String
@galderz
galderz / clean-install-high-sierra-apfs.md
Last active July 3, 2019 21:11
How To Clean Install High Sierra on APFS-formatted main HD

Clean Install High Sierra on APFS-formatted main HD

Installation Steps

  1. From 10.11 or 10.12 systems, format an external hard drive with at least 500gb with "Mac Os Extended Journaled".
  2. Download High Sierra Beta and install it in the external hard drive.
  3. When the system reboots and finishes installation, it will boot from the external HD. Go to Preferences and change Startup Disk to be main HD.
  4. Reboot and press Option key when the computer makes a beep and select external HD to boot from it.
  5. Once booted again into external HD, format main HD to be APFS.
using System.Collections.Generic;
using System.Linq;
using Sitecore.Configuration;
using Sitecore.Data.Managers;
using Sitecore.Diagnostics;
using Sitecore.Globalization;
using Sitecore.Pipelines.HttpRequest;
using Sitecore.Web;
using Sitecore.Sites;