Skip to content

Instantly share code, notes, and snippets.

View CodeWire's full-sized avatar

Travis Garner CodeWire

View GitHub Profile
@CodeWire
CodeWire / permissions.sh
Last active August 29, 2015 14:27 — forked from chuckreynolds/permissions.sh
permissions.sh shell script for WordPress installs to set file and directory permissions and ownership. Change the path to fit your install. Make sure to 'chmod 700 permissions.sh' before using './permissions.sh' to run it.
#!/bin/bash
find /var/www/public -type d -exec chmod 755 {} +
find /var/www/public -type f -exec chmod 644 {} +
chown -R www-data:www-data /var/www/public
@CodeWire
CodeWire / index.html
Last active May 24, 2016 22:45 — forked from anonymous/index.html
Upsell_Offer_Layout
<style id="jsbin-css">
#DIV_1 {
color: rgb(51, 51, 51);
height: 1567px;
max-width: 750px;
width: 724px;
column-rule-color: rgb(51, 51, 51);
perspective-origin: 362px 783.5px;
transform-origin: 362px 783.5px;
border: 0px none rgb(51, 51, 51);
@CodeWire
CodeWire / README.md
Created June 11, 2016 06:35 — forked from dominikwilkowski/README.md
Ubuntu 16.04 setup with NGINX http/2 and letsencrypt

Intro

This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.

Basics

After creating the server (droplet on DigitalOcean) log in with

@CodeWire
CodeWire / Useful Htaccess Tricks and Tips.md
Last active January 5, 2017 17:16 — forked from AliMD/Useful Htaccess Tricks and Tips.md
Useful Htaccess Tricks and Tips for your websites (better performance, speed up, stability and more)Optimized for wordpressTested in 1devs server with apache (not nginx)

Useful htaccess Tricks 4 (better performance, speed up, stability and more)

Apache configuration file (.htaccess) .htaccess files are an overhead, this logic should be in your Apache config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html

Techniques in here adapted from all over, including: html5boilerplate: html5boilerplate.com Kroc Camen: camendesign.com/.htaccesss perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ Useful htaccess tricks & tips: http://www.queness.com/post/5421/17-useful-htaccess-tricks-and-tips

@CodeWire
CodeWire / BackRe_ubuntu_server.md
Last active December 20, 2023 04:06
Backup & Restore Ubuntu Server The Simple Way

How I Backup My Ubuntu Server & Restore To Another Ubuntu Instance

How to backing up Ubuntu server and restoring to another Ubuntu instance

It is adviced to make TWO backups. 1 for / and 1 for /home if they are on different partition. If you want one you will have to add a lot of exceptions to that one command. Example:

1. Open Terminal

sudo -i cd /

@CodeWire
CodeWire / codewire.md
Last active August 17, 2016 03:57
CodeWire Signature

It's the simple things in life which can make the biggest impact! The beauty in art is the vision for those who see it..

1. Install Figlet

Use yum or apt-get to install the tools:

sudo apt-get update
sudo apt-get install toilet figlet 
@CodeWire
CodeWire / unixToolbox.md
Created July 23, 2016 19:00 — forked from tokhi/unixToolbox.md
Collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users.

#Unix Toolbox

This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.

##Unix Toolbox revision 14.4

The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the script example). See also the about page.
Error reports and comments are m
@CodeWire
CodeWire / Steps_To_Format_Linux_Drive_via_Terminal.md
Last active August 11, 2016 19:30
How to fix partition issues in Linux and format the drive in terminal

How to fix partition issues in Linux and format the drive in terminal

I created this tutorial for a close friend of mine. He had an issue when trying to use the disk partition for Ubuntu 14.04. The issue he was facing during a fresh install using a USB pen drive and partitioning an existing drive. So I hope this helps you bro

I think his exact words where something like

Trav, you have to help me bro! I completely jacked up my computers hard drive and don't know what to do. I have a 30 page paper due tomorrow and I am tripping out that tried to do a fresh install at the worst time. Can you please help? -James

1. Boot from CD or USB into Try Ubuntu. Then open terminal.

@CodeWire
CodeWire / install.md
Created August 16, 2016 06:30
Installing VirtualBox on a webserver and using nvc to access it

How to install VirtualBox on a webserver and using nvc to access it

VPS Terminal Setup for vnc server

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop  
sudo apt-get install vnc4server