Posts

Showing posts from 2016

Vlad's Diving Into Go : Chapter 1 : Introducing Go

Solving Modern Programming Challenges with Go Takes much of the overhead out of object-oriented development to focus on code reuse Has a garbage collector Development Speed Uses a smart compiler and simplified dependency resolution algorithms Compiler only looks at libraries that re included in the entire dependency chain Needs a test suite to avoid discovering incorrect type bugs at run time Concurrency Go's concurrency support is one of its strongest features goroutines are like threads but use less memory and require less code Creates a model where you can send data between goroutines rather than letting goroutines fight to use the same data Goroutines Goroutines are functions that run concurrently with other goroutines Many goroutines execute on a single thread Goroutines use less memory than threads and the Go run time will schedule the execution of goroutines against a set of configured logical processors Each processors is bound to a single OS thread which makes more effici...

Can't install Kali Linux from USB, fails to find CD-ROM drive

open a shell  create the directory cdrom directly on the root of the file system mkdir /cdrom mount the USB as if it is a CD ROM mount -t vfat /dev/sdb1 /cdrom

Handling .zip, .tgz, .deb, .bundle

.bundle File  Change permissions first then run the executable chmod a+x fileName.bundle ./fileName .zip File Extract by typing the following commands unzip fileName.zip .tgz File Extract by typing the following commands tar xzf fileName.tgz .deb Run this command followed by the seccond sudo dpkg -i /path/to/deb/File  sudo apt-get install -f -y .xz/.tar/gz  Run this command tar xf fileName.xz tar xf fileName.tar tar xf fileName.gz

Running a C program in Ubuntu Linux

write and save file with a .c suffix lets call it prog1.c compile the program  gcc -o prog1 prog1.c execute the program ./prog1

Common Commands

Common Commands Removing a folder via command line rm -rf dirName Copying a folder in linux cp -avr source destination

Github “fatal: remote origin already exists”

As the error message indicates, there is already a remote configured with the same name. So you can either add the new remote with a different name or update the existing one if you don't need it: To add a new remote, called for example github instead of origin (which obviously already exists in your system), do the following: $ git remote add github git@github.com:ppreyer/first_app.git Remember though, everywhere in the tutorial you see "origin" you should replace it with "github" . For example $ git push origin master should now be $ git push github master . However, if you want to see what that origin which already exists is, you can do a $ git remote -v . If you think this is there by some error, you can update it like so: $ git remote set-url origin git@github.com:ppreyer/first_app.git

Generating a new SSH key

ssh -keygen -t rsa -b 4096 -C "yourEmail@example.com" Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter] Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again]

Resetting Mysql Root Password

Kill the running mysql process sudo service mysql stop Start mysql in safe mode and skip grant tables sudo mysqld_safe --skip-grant-tables --skip-networking & Log in with root mysql -u root Initial privilege flush flush privileges; Use mysql database use mysql; Set a new mysql root password update user set authentication_string=PASSWORD("newPassword") where user='root';  Final privilege flush flush privileges; Exit mysql exit; Stop mysql service sudo /etc/init.d/mysql stop Start mysql service sudo /etc/init.d/mysql start Log in to database to test it mysql -u root -p

My Local Farm Website Creation

1. Get domain from namecheap (mylocalfarm.me) 2. Get hosting from digitalocean 3. Connect to console log in etc (look at past journals to verify steps) ssh root@<ip address> in console from digital ocean ssh root@<ip address> from remote computer 4. install apache: sudo apt-get install apache2 5. install php: sudo apt-get install php-mbstring php7.0-mbstring php-gettext sudo service apache2 restart 6. adding a new user useradd userName 7.adding a new user password passwd userName 8. sign into the new user  su -l newUser 8. sign out of new user exit 9. add new user to sudoers group sudo adduser userName sudo 10. install fail2ban to avoid ddos attack sudo apt-get install fail2ban  11.Okay so apparently this idea has already been made so im going to shift more into learning concepts and put this project on the back burner.  

Setting up a Server

http://code.tutsplus.com/tutorials/how-to-setup-a-dedicated-web-server-for-free--net-2043

Snap Assists on Ubuntu 16

Snap Assists on Ubuntu 16 Resource Link sudo apt-get install compizconfig-settings-manager -y Search for application CompizConfig Click WindowManagement Now Change the following Upper Left Corner - Top Left Corner   Upper Right Corner - Top Right Corner   Bottom Left Corner - Bottom Left Corner   Bottom Right Corner - Bottom Right Corner  

DigitalOcean Login Problem

Ref Link: (https://www.digitalocean.com/community/questions/i-am-unable-to-set-new-password-on-my-droplet-from-console-is-there-any-bug-which-has-not-been-fixed-since-2-months) 1.  Use root as the login 2. Use the password that you were emailed 3. When you are asked to enter current UNIX password     enter the password which was emailed to you 4. Enter a new password 5. Retype password

Connecting namecheap domain name to digital ocean hosting service

Image
Extra Help: (http://wern-ancheta.com/blog/2015/03/15/how-to-assign-a-namecheap-domain-name-on-a-digitalocean-droplet/)

Working with SSH key (second time only)

copy ssh key plug in this line the copy the cotents cat ~/.ssh/id_rsa.pup what to do if you see this line Permission denied (publickey) eval "$(ssh-agent -s)" ssh-add enter passphrase then add a word

google internship tips

Image
-go in detail on what was completed with the club: (impact) -quantify differences made(experience) -engineering topics (skills) -experience: (have impact full experiences stand out) -only list things one is good at -extra things: (personal website rec, linkedin, gitHub) -consider qr codes(supplemental) -resume focus: (actions, concise, well structured, prioritize) -show strong cs fundamentals- -things to avoid(spelling errors, laundry list) -important(touching software, hackathon info, show capacity) -

SSH Into Raspberry Pi Via Command Line

Today I learned how to ssh into a Raspberry Pi from a remote computer on the same network. 1. Find the ip of the host by using the command hostname -I 3. do this on the pi ssh pi@<ip-address> 2. the login name is pi 3. the password is raspberry 4. then do the same command on the remote computer