create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php | |
if(php_sapi_name()!=="cli"){ | |
echo "Must be run from the commend line."; | |
}; | |
/** | |
* Setup a magento instance so we can run this export from the command line. | |
*/ | |
require_once('app/Mage.php'); | |
umask(0); | |
if (!Mage::isInstalled()) { |
<?php | |
$host = 'localhost'; | |
$username = 'dbuser'; | |
$password = 'dbpass'; | |
$db_name = 'dbname'; | |
$table_name = 'tablename'; | |
$db_conn = mysqli_connect($host, $username, $password) or die('Error: Could not connect.'); | |
mysqli_select_db($db_conn, $db_name) or die('Error: Could not select database.'); | |
$result = mysqli_query($db_conn, "SELECT * from " . $table_name) or die('Error: Could not query.'); |
<?php | |
$host = 'localhost'; | |
$username = 'dbuser'; | |
$password = 'dbpass'; | |
$db_name = 'dbname'; | |
$table_name = 'tablename'; | |
$db_conn = mysql_connect($host, $username, $password) or die('Error: Could not connect.'); | |
mysql_select_db($db_conn, $db_name) or die('Error: Could not select database.'); | |
$result = mysql_query($db_conn, "SELECT * from " . $table_name) or die('Error: Could not query.'); |
import telegram | |
from telegram.ext import Updater, CommandHandler | |
import praw | |
import json | |
# connect and authorize with Reddit API | |
reddit = praw.Reddit( | |
client_id='REDDIT_APP_CLIENT_ID', | |
client_secret='REDDIT_APP_CLIENT_SECRET', | |
user_agent='pytgbot1 by /u/ringate' |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).