This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"github.com/tkanos/gonfig" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update # update package info | |
apt-get upgrade # upgrade installed packages | |
dpkg -l | grep php # list all installed packages that contain the word php | |
apt-cache search bla-bla-blah # search for bla-bla-blah | |
apt-get install bla-bla-blah # install the bla-bla-blah package | |
apt remove composer # remove the composer | |
composer require league/climate # install the league/climate package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Download and install the correct version of wkhtmltopdf | |
# | |
OLD_DIR=$(pwd) | |
mkdir wkhtmltopdf-temp | |
cd wkhtmltopdf-temp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the stuff in angle brackets <> | |
[user] | |
name = <Your name> | |
email = <[email protected]> | |
[core] | |
autocrlf = input | |
safecrlf = true | |
pager = | |
excludesfile = /Users/<username>/.gitignore_global | |
editor = nano |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Find a branch name based on the Manuscript case number | |
# | |
# $1 should be a manuscript case number | |
# It will be copied to the clipboard | |
# | |
# sed is for removing the '* ' from the beginning of the line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Generate key pair | |
# Will create 2 files: | |
# - private_key.pem | |
# - public_key.pem | |
# | |
openssl genrsa -aes256 -out private_key.pem 2048 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Send a slack alert to a channel | |
# | |
# Find the SLACK_URL for the desired channel | |
# | |
# | |
# echo "Sending message to slack channel" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# After this is run, edit /etc/goaccess.conf as needed | |
# | |
echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/goaccess.list | |
wget -O - https://deb.goaccess.io/gnugpg.key | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install goaccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wp-cli-update | |
# | |
# Download the latest wp-cli and put it wherever it is supposed | |
# to go. | |
# | |
WPCLI_LOCATION=/usr/local/sbin/wp | |
curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
I am using Laravel 5.2. This will probably work for many versions, but use at your own risk. | |
Instructions | |
- Make sure that you add SLACK_TOKEN, SLACK_CHANNEL, SLACK_USERNAME, SLACK_ICON in .env | |
- SLACK_ICON - you can use almost any emoji that Slack supports. See http://www.emoji-cheat-sheet.com/ | |
- SLACK_USER - You can use any username you want to. It doesn't have to be an existing user | |
- SLACK_CHANNEL - I don't know what happens if you use a non-existent channel. I always make sure the channel exists first | |
- SLACK_TOKEN - You can find this in your Slack account somewhere | |
- Add the code below to the top of bootstrap/app.php |