Skip to content

Instantly share code, notes, and snippets.

View justinhartman's full-sized avatar
🏠
Working from home

Justin Hartman justinhartman

🏠
Working from home
View GitHub Profile
@justinhartman
justinhartman / yarn-npm-replacement.md
Last active August 17, 2022 13:20
Replace NPM with Yarn as global package manager

List installed NPM global packages

$ npm list -g --depth 0
~/.nvm/versions/node/v16.13.2/lib
├── corepack@0.10.0
├── eas-cli@0.52.0
├── expo-cli@5.4.7
├── npm@8.1.2
└── yarn@1.22.18
@justinhartman
justinhartman / 0_introduction.md
Last active July 11, 2023 08:23
Setup Azure Ubuntu 18.04 LEMP VM

How To Install Nginx, MySQL, PHP, SFTP on an Ubuntu Azure Virtual Machine

This series of documents will configure and setup a Nginx, MySQL, and PHP (LEMP) server on a basic Standard B1s (1 vcpus, 1 GiB memory) Ubuntu 16.04 or 18.04 LTS Virtual Machine on Microsoft Azure.

This will also install other useful packages and configurations for SFTP and a fully automated SSL service using certbot for Let's Encrypt.

The B1s is Azure's entry level Linux VM and only comes with 1 GiB memory so

@ishad0w
ishad0w / sources.list
Last active June 1, 2024 16:29
Debian 10 (Buster) -- Full sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian buster-backports main contrib non-free
deb-src http://deb.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free
@qutek
qutek / instruction.md
Last active November 7, 2023 12:45
[Install ZeroMQ MAC] Install PHP ZeroMQ MAC #mac #php

Install with brew

  • brew install zmq

Make php-zmq

  • git clone git://github.com/mkoppanen/php-zmq.git
  • cd php-zmq
  • phpize && ./configure
  • make && make install

Add extension to php.ini:

#!/bin/bash -v
# backing up a vm
cd /media/tim/WD6/
base="/home/tim/VirtualBox VMs"
src=win10-2018
mv $src.tar.lz4 $src.tar.lz4.old
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active May 10, 2024 04:36
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com

adb and fastboot must know

Install android SDK (bottom of the page) or full android studio if you need to develop on android.

fastboot looks like adb but it is used when device is in bootloader (or fastboot).

Check connected devices

adb:

@tao
tao / gist:fba880299bdfdcfd491582724ede9dd7
Last active September 11, 2023 14:29
Using Passport with Laravel Spark
# Installation
As far as I know this is how to get Passport on Laravel Spark working correctly, it works so far for me over the API but there might be something I am still missing.
I am using the following software versions in composer.json:
```
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
@danieleggert
danieleggert / GPG and git on macOS.md
Last active May 26, 2024 06:43
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@ifamily
ifamily / wp-config.php
Last active January 8, 2024 05:06
A universal WordPress wp-config.php which works on local development to staging and production server environments.
<?php
/*
One wp-config for local development to staging to production.
*/
// Define Environments
$environments = array(