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 / 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
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@adamhut
adamhut / laravel-websockets-on-forge.md
Last active June 16, 2020 03:13
Laravel Websockets on Forge Note Using SSL

Step by Step to create a stand along Laravel Websocket Server

I can make the laravel-websocket works local and on forge without SSL. I want to make it work when it with SSL on Forge as well. I read some articles and the officeal documnet to make it work. The follwoing is my sernario.This take me a long to make it work. Thank Alex Bouma's article finaly make my case work.

Sernario

  • One stand alone Weksocket Server
@nahonen
nahonen / copy_current_line_xcode.md
Created February 28, 2019 10:25
Copy the current line in Xcode
@djaiss
djaiss / progress_bar_migration_laravel.php
Last active May 4, 2024 15:03
Laravel: Use progress bars in migrations
<?php
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\ConsoleOutput;
class DoSomething extends Migration
{
public function up()
{
$output = new ConsoleOutput();
@nissicreative
nissicreative / laravel-new.md
Last active December 11, 2019 18:14
Laravel Site Setup

Laravel Project Setup

Configure Homestead Virtual Machine

(Create local database)

Update Homestead YAML File (sites and databases):

@lopspower
lopspower / README.md
Last active May 17, 2024 04:22
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@fevangelou
fevangelou / my.cnf
Last active May 10, 2024 10:05
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@jonathantneal
jonathantneal / README.md
Last active March 19, 2024 23:31
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@DHS
DHS / PHP Countries Array
Created November 4, 2011 18:51
PHP array of all country names
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island