Skip to content

Instantly share code, notes, and snippets.

View edwardteach42's full-sized avatar

Edward Teach edwardteach42

View GitHub Profile

Keybase proof

I hereby claim:

  • I am edwardteach42 on github.
  • I am edwardteach42 (https://keybase.io/edwardteach42) on keybase.
  • I have a public key ASBiEStDay9NJb7m5i1BeEIOd_ruLO4K1-RpQP39JVkxDgo

To claim this, I am signing this object:

@edwardteach42
edwardteach42 / Remove all git tags
Created February 23, 2022 01:08 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@edwardteach42
edwardteach42 / bonsainerd-under-construction-page.markdown
Created February 8, 2022 02:51
BonsaiNerd Under Construction Page
@edwardteach42
edwardteach42 / setup.md
Last active June 22, 2020 19:35
Dappur Site Setup Checklist

Global Settings

  • Site Name
  • Site Domain
  • Support Email
  • From Email
  • Site Logo
  • Header Logo
  • Google Analytics
  • Recaptcha
#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/
@edwardteach42
edwardteach42 / gist:4560435
Created January 17, 2013 22:28
Set Up a CentOS Server on EC2 with Git Deployment

#CentOS Server on EC2 with Git Deployment


##Use Rightscale CentOS Community Server Image ami-09496d4c

###Step 1: SSH into the server and do the following

BE SURE YOU PERFORM THESE ACTIONS AS ROOT OR SU

$ yum update

$ yum install git mysql mysql-libs httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-mcrypt

@edwardteach42
edwardteach42 / gist:2911422
Created June 11, 2012 17:23
List all $_POST's as Variables in PHP
foreach ( $_POST as $key => $value ){
echo '$' . $key . ' = $_POST[\'' . $key . '\'];<br />';
}
@edwardteach42
edwardteach42 / gist:1975320
Last active October 1, 2015 10:37
Host a git repository on Amazon EC2
Set Up CentOS Server
Use Rightscale CentOS Community Server Image ami-09496d4c
*****AS ROOT*****
$ yum update
$ yum install git mysql mysql-libs httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-mcrypt
$ echo 'service httpd restart' >> /etc/rc.local
$ ssh-keygen -t rsa -C "email@example.com"
$ useradd git
$ passwd git
$ cd /home/git
@edwardteach42
edwardteach42 / gist:1725285
Created February 2, 2012 19:33
Insert After XX Number of Rows - PHP
<?php
$i = 1;
while ($x < 17){
echo 'Data ' . $i . '<br>';
//Change Value to how many rows you want to insert after.
if( ($i % 3) == 0 ){
echo 'Snippet of text--<br>';
}
@edwardteach42
edwardteach42 / gist:1719597
Created February 1, 2012 21:33
Store Array to Database field as CSV
<?php
$array = array('value1', 'value2', 'value3');
$comma_separated = implode(",", $array);
print $comma_separated; // value1,value2,value3
//when you pull it back out, explode it, and then you will have your array!
?>