Skip to content

Instantly share code, notes, and snippets.

View emotality's full-sized avatar
✌️
Hustling

Jean-Pierre Fourie emotality

✌️
Hustling
  • South Africa
View GitHub Profile
@emotality
emotality / duplicate_line_xcode.md
Last active April 6, 2024 04:23
Xcode - Duplicate Line key binding

NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:

New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)


Xcode line duplicate

Bind keys to duplicate lines in Xcode

@emotality
emotality / macos_tools.md
Last active February 13, 2024 10:36
macOS apps, themes and settings I use
@emotality
emotality / omz_with_jovial.md
Last active September 24, 2023 20:17
Oh My Zsh with Jovial

Oh My Zsh with Jovial on macOS

Oh My Zsh bash with the Jovial theme

omz-jovial.png

Steps

If you don't have Homebrew, install it:

@emotality
emotality / countries.json
Created December 6, 2019 11:29
Countries JSON
[
{
"id": 1,
"name": "Afghanistan",
"iso2": "AF",
"iso3": "AFG",
"tld": "af",
"fips": "AF",
"iso": "004",
"geo_name_id": "1149361",
@emotality
emotality / CountriesTableSeeder.php
Created December 6, 2019 11:25
Countries Laravel table seed
<?php
use App\Country;
use Illuminate\Database\Seeder;
class CountriesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
@emotality
emotality / ubuntu_18_mail_server.md
Last active November 9, 2022 13:35
Ubuntu 18.04 Postfix with Dovecot mail server

Ubuntu 18.04 Mail Server

UPDATE: I will not be answering questions as this guide is outdated and just copied and pasted into a single page with improved order (not redoing steps or editing the same file over and over in different steps).

Please check out the original article which is being updated frequently:
LinuxBabe - Build Your Own Email Server on Ubuntu: Basic Postfix Setup

Overview

Steps were re-written from below links for faster setup.

@emotality
emotality / mamp_macos.md
Last active October 20, 2022 03:19
Install and configure Apache, MySQL and PHP on macOS

MAMP (LAMP stack on macOS)

macOS Mojave comes pre-installed with apache 2.4.34 and PHP 7.1.19. This guide is just to configure apache and install MySQL 5.7.25.

Apache

Make a Sites folder in your home folder

$ mkdir ~/Sites
@emotality
emotality / cloudflared_doh.md
Created May 11, 2022 19:16
Install Cloudflare DoH (DNS over HTTPS) for macOS

Cloudflare DoH (DNS over HTTPS)

Currently all DNS queries are being queried over normal HTTP that can be intercepted and the hacker/scammer can then respond with a different IP address, misleading you to a clone of the original website that the hacker owns. This can be avoided by installing Cloudflare's own app, cloudflared, on your machine to route all your DNS queries over HTTPS which is secure and can't be altered. It's also a lot faster! 💡 Learn More

This is a guide on how to install cloudflared to query Cloudflare's DNS server over an HTTPS connection.

👨‍🔧 Installation

  1. Install Homebrew if you don't have it
@emotality
emotality / cloudflare_ddns.md
Last active May 5, 2022 21:20
CloudFlare Dynamic DNS (DDNS) for home server

CloudFlare Dynamic DNS (DDNS)

A CloudFlare Dynamic DNS (DDNS) cronjob for your home server!

Steps will be added soon!

@emotality
emotality / php73_macos.md
Last active March 13, 2022 14:03
Install PHP 7.2 on macOS

PHP 7.3 on macOS

Install PHP

$ curl -s https://php-osx.liip.ch/install.sh | bash -s force 7.3

Add path to your bash profile to access it globally: