I got this error when I attempted to use the vi editor (vim-enhanced) under Fedora Linux.
I fixed it by deleting the .viminfo file in my home directory and removing vim-enhanced and re-installing it again.
yum -y remove vim-enhanced
yum -y install vim-enhanced
Quick setup — SSH
We recommend every repository include a README, LICENSE, and .gitignore.
Create a new repository on the command line
mkdir newreponame (md newreponame) on Windows commandline.
cd newreponame
- git init
- git add README.md
- git commit -m “first commit”
- git remote add origin git@github.com:githubusername/RH.git
- git push -u origin master
- touch README.md
Push an existing repository from the command line
- git remote add origin git@github.com:githubusername/RH.git
- git push -u origin master
Quick setup — HTML
- git init
- git add README.md
- git commit -m “first commit”
- git remote add origin https://github.com/githubusername/RH.git
- git push -u origin master
- touch README.md
Push an existing repository from the command line
- git remote add origin https://github.com/githubusername/RH.git
- git push -u origin master
Error when running “git push origin master”.
Robs-MacBook-Pro:gitrepo1 localuser$ git push origin master remote: Permission to githubuser1/gitrepo1.git denied to githubuser2. fatal: unable to access 'https://github.com/githubuser1/gitrepo1.git/': The requested URL returned error: 403
I simply added the user githubuser2 as a collaborator on gitrepo1 and it worked.
Robs-MacBook-Pro:gitrepo1 localuser$ git push origin master Counting objects: 5, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 383 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To http://github.com/githubuser1/gitrepo1.git 6b70d17..0ec0b91 master -> master Robs-MacBook-Pro:gitrepo1 localuser$
A list of show functions that can be used in MySQL.
SHOW AUTHORS SHOW BINARY LOGS SHOW BINLOG EVENTS SHOW CHARACTER SET SHOW COLLATION SHOW COLUMNS SHOW CONTRIBUTORS SHOW CREATE DATABASE SHOW CREATE EVENT SHOW CREATE FUNCTION SHOW CREATE PROCEDURE SHOW CREATE TABLE SHOW CREATE TRIGGER SHOW CREATE VIEW SHOW DATABASES SHOW ENGINE SHOW ENGINES SHOW ERRORS SHOW EVENTS SHOW FUNCTION CODE SHOW FUNCTION STATUS SHOW GRANTS SHOW INDEX SHOW INNODB STATUS SHOW MASTER STATUS SHOW OPEN TABLES SHOW PLUGINS SHOW PRIVILEGES SHOW PROCEDURE CODE SHOW PROCEDURE STATUS SHOW PROCESSLIST SHOW PROFILE SHOW PROFILES SHOW SCHEDULER STATUS SHOW SLAVE HOSTS SHOW SLAVE STATUS SHOW STATUS SHOW TABLE STATUS SHOW TABLES SHOW TRIGGERS SHOW VARIABLES SHOW WARNINGS
1. Install sshfs and fuse
Fedora: yum -y install fuse-sshfs Ubuntu: apt-get install sshfs
2. Add user that you want to use with sshfs to the fuse group. I did’t need this step with Fedora 20 (There was no group named fuse).
usermod -a -G fuse joebob
3. Make a directory locally so that you can use it as a mount point for your remote ssh directory.
mkdir localdirectory4ssh
4. Mount the remote directory to the local mount point that you created in step 3.
sshfs remoteusername@remoteserver:/remotedirectory localdirectory4ssh *You will be prompted for your remote password.
5. Change into your localdirectory4ssh.
cd localdirectory4ssh You should see all of the files and directories on your remote server.
Fedora 17 – Install Scanner
Xsane
The most flexible scanning software available. Xsane gives you fine grain control over scanning. One very handy feature is the ability to batch scan multiple areas of your scanner, which is great for scanning photos using time-consuming high resolution settings.
Simple-scan
Just as the name indicates. A very simple scanner. Place document, hit scan, and go. The one very nice feature of simple-scan is the ability to batch scan several sheets into a single PDF file, provided you have the hardware to do so. Many multifunction printers have an automatic document feeder feature
Sane
Before any scanning software can be used, the backend that controls the scanner must be installed. Sane, an acronym for Scanner Access Now Easy, is just that. Install it, and go. Any sane compatible scanner will work. I’ve had success with HP MFC printers, and I have a Canon scanner. Both work with no issues, including the wireless HP MFC printer!
As root,
yum -y install sane-backends-drivers-scanners
sane-find-scanner
You may find it necessary to unplug and re-plug in the USB cable to your scanner before trying one of the below scanning programs.
Xsane
As root, with your USB scanner attached and powered up
yum -y install xsane
Simple Scan
As root,
yum -y install simple-scan
Find duplicate data in a column.
SELECT column1, COUNT(*) c FROM table GROUP BY column1 HAVING c > 1;
Source
Enum is a good choice for boolean type of fields except that it is treated as a string and not an integer. In this case I just want to set a column in the table to indicate whether the row is active (1) or not (0). I do not want someone to accidentally enter a 2, 3, etc. in the field.
alter table healthtemperature1 add column active_ind enum('0','1') not null; Article on Enum
/* drop database lastinsert_id; create database lastinsert_id; use lastinsert_id; create table foo (id int(11) auto_increment primary key , text varchar(50) not null)engine=myisam; create table foo2 (id int(11) auto_increment primary key , foo_id int(11) not null, text varchar(50) not null)engine=myisam; */ INSERT INTO foo (id,text) VALUES(NULL,'filename'); # generate ID by inserting NULL INSERT INTO foo2 (id,foo_id,text) VALUES(NULL,LAST_INSERT_ID(),'last_insert_id.sql'); # use ID in second table