I hereby claim:
- I am buluma on github.
- I am buluma_michael (https://keybase.io/buluma_michael) on keybase.
- I have a public key whose fingerprint is 2446 D833 4B9E 98BB 8094 A36C 7463 DB01 C54C 6BB0
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/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: " |
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #007B00; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
[mysqld] | |
server_id=1 | |
datadir=/var/lib/mysql | |
socket=/var/lib/mysql/mysql.sock | |
user=mysql | |
# Default to using old password format for compatibility with mysql 3.x | |
# clients (those using the mysqlclient10 compatibility package). | |
old_passwords=1 | |
#replication config |
Joomla 1.5 Logout Link | |
<?php | |
$returnURL = base64_encode(JURI::root() . ""); | |
$user =& JFactory::getUser(); | |
echo 'Hi,'.$user->username; | |
?> | |
<a href="index.php?option=com_user&task=logout&return=<?php echo $returnURL; ?>"> | |
<input type="button" name="Submit" class="button" value="Logout"></a> |
#Since I have a habit of forgetting things, I'll keep this here: | |
The following link is for direct logout: | |
http://example.com/index.php?option=com_users&task=user.logout | |
But a user token is required in order to avoid an error message Invalid Token, and some PHP magic is required in order to get the token. The following code will display a Login link to guests, and a direct Logout Username link to logged in users: | |
$user = JFactory::getUser(); | |
if ($user->guest) | |
{ |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream