Skip to content

Instantly share code, notes, and snippets.

View oliveratgithub's full-sized avatar

Oliver oliveratgithub

View GitHub Profile
@mcsepes
mcsepes / emoji.php
Last active December 27, 2022 17:50
Check if string has emojis PHP. DEPRECATED. USE AT YOUR OWN RISK
<?php
// DEPRECATED. USE AT YOUR OWN RISK
function isStringHasEmojis($string)
{
$emojis_regex =
'/[\x{0080}-\x{02AF}'
.'\x{0300}-\x{03FF}'
.'\x{0600}-\x{06FF}'
.'\x{0C00}-\x{0C7F}'
.'\x{1DC0}-\x{1DFF}'
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;
@kevinelliott
kevinelliott / 1-macOS-10.14-mojave-setup.md
Last active April 2, 2023 11:46
macOS 10.14 Mojave Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.14 Mojave Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.14 Mojave.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@oliveratgithub
oliveratgithub / autoexec.cfg
Last active September 11, 2021 09:23
ioQuake3 – custom high definition configurations for best visual quality (Quake 3, Quake III Arena). This config file is featured on https://swissmacuser.ch/how-you-want-to-run-quake-iii-arena-in-2018-with-high-definition-graphics-120-fps-on-5k-resolution/
seta r_mode "-1"
seta r_customwidth "5120"
seta r_customheight "2880"
seta cg_fov "115"
seta cg_gunCorrectFOV "1"
seta cl_renderer "opengl2"
seta r_allowSoftwareGL "0"
seta r_ignoreGLErrors "1"
seta r_smp "1"
seta r_displayrefresh "0"
@oliveratgithub
oliveratgithub / emojis.json
Last active April 19, 2024 05:47
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
@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.
@oliveratgithub
oliveratgithub / curl_url_check.sh
Last active February 7, 2023 06:08
Simple one-liner curl command for macOS/Unix bash terminal to repeatedly check a specific url
# Remark: list of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
clear; while [ : ]; do curl -sSL -w '%{http_code} %{url_effective} ' "https://github.com" -o /dev/null; echo $(TZ=":Europe/Zurich" date); sleep 5; done
@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
@oliveratgithub
oliveratgithub / curl-crawler.sh
Last active November 23, 2023 01:49
Unix Shell-Script to crawl a list of website URLs using curl
#!/bin/sh
timezone="Europe/Zurich"
# List of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
script="${0##*/}"
rootdir=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
logfile="$script.log"
log="$rootdir/$logfile"
now=$(TZ=":$timezone" date)
# Uncomment 'mailto=' (remove #) to enable emailing the log upon completion
#mailto="your@email.com"
@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