Skip to content

Instantly share code, notes, and snippets.

@stevenwaskey
stevenwaskey / composer-private-package-github-token.md
Created May 16, 2023 02:08 — forked from jeffersonmartin/composer-private-package-github-token.md
Generate a GitHub Personal Access Token for Private Composer Packages

Generate a GitHub Personal Access Token for Private Composer Packages

If you're trying to load a private repository with Composer/Laravel, we'll need to generate a GitHub Personal Access Token (similar to OAuth token) to access the repository during a composer install without entering credentials.

If you have used other Github packages from {my-org} before, you may be able to skip this step.

  1. Visit https://github.com/settings/tokens.

  2. Click Generate new token.

@stevenwaskey
stevenwaskey / clean.sh
Created April 20, 2021 13:09 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@stevenwaskey
stevenwaskey / clear-net-ports.sh
Created August 22, 2017 16:03
Clears out port collisions for VMWare guests in Vagrant env.
#!/bin/bash
##
# Show the user what we're looking to remove from the network configs.
##
printf "\nWe've located the following entries matching the associated port argument. \n"
grep "add_nat_portfwd" /Library/Preferences/VMware\ Fusion/networking | grep $1
@stevenwaskey
stevenwaskey / Kernel.php
Created March 2, 2017 01:35 — forked from ivanvermeyen/Kernel.php
Find any running "queue:listen" processes for a Laravel project and kill those. Fire "php artisan queue:stop" in your "current" project root. Intended to use with a deploy script when you are using non-daemon listeners and deploy releases. If you are using daemons, run "queue:restart" instead. You can use a process monitoring tool like Superviso…
<?php
namespace App\Console;
use App\Console\Commands\StopQueueListeners;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
@stevenwaskey
stevenwaskey / .htaccess
Created July 27, 2016 12:45 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@stevenwaskey
stevenwaskey / wp.sh
Created July 20, 2016 02:47 — forked from phlbnks/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser
@stevenwaskey
stevenwaskey / wp.sh
Created July 20, 2016 02:38 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
*
***___________________________________________________________________
||| |
||| * * * * * |------------------------------------------
||| * * * * * * |000000000000000000000000000000000000000000
||| * * * * * |------------------------------------------
||| * * * * * * |
||| * * * * * |------------------------------------------
||| * * * * * * |000000000000000000000000000000000000000000
@stevenwaskey
stevenwaskey / ubuntu-php7-install.bash
Created June 15, 2016 01:27
Ubuntu 14.04 PHP7 (Install from Source)
#!/usr/bin/env bash
sudo -i;
apt-get update;
apt-get install --yes \
git \
bison \
autoconf \
@stevenwaskey
stevenwaskey / gist:3d7f0136051b437286608d6b8e2c87f2
Created June 9, 2016 16:19
Install the AWS CLI Without Sudo (Linux, OS X, or Unix)
Install the AWS CLI Without Sudo (Linux, OS X, or Unix)
Amazon: [Installing the AWS Command Line Tool](http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os)
If you don't have sudo permissions or want to install the AWS CLI only for the current user, you can use a modified version of the above commands:
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -b ~/bin/aws