[Quick Links] |
Search Site

Site Details

rendered in 0.0670 secs

Captain's Log | Sunday 17th of September 2017

Composer: remove a package, clean up dependencies, don't update other packages | ref delete


Remove the entry from composer.json then run composer update phpmd/phpmd

Captain's Log | Wednesday 13th of September 2017

git public key denied | ssh repo push pull

cat /home/dave111/.ssh/id_rsa.pub >> /home/novajizz/.ssh/authorized_keys

rss2email r2e rss2mail how to add new feed

r2e add friendlyname http://www.gsmarena.com/rss-news-reviews.rss e@mailaddress.io

r2e config file location | src

~/.config/rss2email.cfg

codeigniter form validation check if exists callback

        public function optionsForm() {
            $this->load->library('form_validation');
            $this->form_validation->set_rules('email', 'Email Address', 'valid_email|trim|required|xss_clean|callback_checkEmailExists');
            $this->form_validation->set_rules('hideOffline', 'Hide Offline Nodes', 'xss_clean');

            if($this->form_validation->run() == FALSE) {
                $this->options();
            } else {
                $data = array(
                    'email'         => $this->input->post('email'),
                    'hideOffline'   => $this->input->post('hideOffline'),
                );
                $this->db->where('id', $this->session->userdata('user_id'));
                $this->db->update('user', $data);

                $new_session_data = array(
                    'hideOffline'   => $this->input->post('hideOffline'),
                    'user_email'    => $this->input->post('email'),
                ); //update current session data
                $this->session->set_userdata($new_session_data);
                $this->session->set_flashdata('message', 'Configuration saved at '.date('H:i:s'));
                redirect(base_url()."user_options/options"); //if you just load $this->options the flashmessage is like one refresh behind
            }

        }

        public function checkEmailExists() {
            $this->db->where('email', $this->input->post('email'));
            $emailCheckExist = $this->db->get('user');
            if($emailCheckExist->num_rows() > 0) {
                $this->form_validation->set_message('checkEmailExists', 'Email address is already in use by another account.');
                return FALSE;
            } else {
                return TRUE;
            }
        }


Captain's Log | Wednesday 13th of September 2017

Common Linux file and folder permissions | chmod chown octal home src


Here is a list of some common settings, numerical values and their meanings:
-rw------- (600) — Only the owner has read and write permissions.
-rw-r--r-- (644) — Only the owner has read and write permissions; the group and others have read only.
-rwx------ (700) — Only the owner has read, write, and execute permissions.
-rwxr-xr-x (755) — The owner has read, write, and execute permissions; the group and others have only read and execute.
-rwx--x--x (711) — The owner has read, write, and execute permissions; the group and others have only execute.
-rw-rw-rw- (666) — Everyone can read and write to the file. (Be careful with these permissions.)
-rwxrwxrwx (777) — Everyone can read, write, and execute. (Again, this permissions setting can be hazardous.)

Here are some common settings for directories:
drwx------ (700) — Only the user can read, write in this directory.
drwxr-xr-x (755) — Everyone can read the directory; users and groups have read and execute permissions.


Captain's Log | Tuesday 5th of September 2017

save git credentials for pushing to github from command line | creds ref


You've probably checked out the repo as https rather than ssh.
git clone ssh://github.com/rickoneeleven/fizzbuzz

Captain's Log | Monday 28th of August 2017

Proxmox slow backups - 10Mb/s | nfs network ref


Please take a look at the end of http://pve.proxmox.com/wiki/Performance_Tweaks
The issue with backups may be due to the default bandwidth limit of 10Mb/s