Skip to main content

Posts

Showing posts from April, 2017

Ubuntu 16:04 - Remove RVM

mccrazy@Lenovo-N22:~$ rm -rf .rvm* mccrazy@Lenovo-N22:~$ subl  .bash_profile mccrazy@Lenovo-N22:~$ sudo rm -rf /etc/rvm* [sudo] password for mccrazy: mccrazy@Lenovo-N22:~$ sudo groupdel rvm groupdel: group 'rvm' does not exist mccrazy@Lenovo-N22:~$ rvm No command 'rvm' found, but there are 26 similar ones rvm: command not found mccrazy@Lenovo-N22:~$

Getting my notes

mccrazy@Lenovo-N22:~$ cls No command 'cls' found, but there are 18 similar ones cls: command not found mccrazy@Lenovo-N22:~$ clean cNo command 'clean' found, did you mean:  Command 'clear' from package 'ncurses-bin' (main)  Command 'uclean' from package 'svn-buildpackage' (universe)  Command 'pclean' from package 'pbuilder-scripts' (universe) clean: command not found mccrazy@Lenovo-N22:~$ clear mccrazy@Lenovo-N22:~$ ls Desktop    Downloads         Music     Public     Videos Documents  examples.desktop  Pictures  Templates mccrazy@Lenovo-N22:~$ cd Documents/ mccrazy@Lenovo-N22:~/Documents$ dir mccrazy@Lenovo-N22:~/Documents$ ls mccrazy@Lenovo-N22:~/Documents$ git clone https://baliwme@bitbucket.org/biboyatienza/crazynotes.git Cloning into 'crazynotes'... Password for ' https://baliwme@bitbucket.org ': remote: Counting objects: 131, done. remote: Compressing objects: 100% (127/127), done. remote: Total 131 (

Ubuntu 16.04 - How to install git [E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)]

mccrazy@Lenovo-N22:~$ sudo apt install git [sudo] password for mccrazy: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? mccrazy@Lenovo-N22:~$ git The program 'git' is currently not installed. You can install it by typing: sudo apt install git mccrazy@Lenovo-N22:~$ sudo apt install git E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? mccrazy@Lenovo-N22:~$ sudo apt install git E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? mccrazy@Lenovo-N22:~$ ^C mccrazy@Lenovo-N22:~$ ps -A | grep apt-get mccrazy@Lenovo-N22:~$ ps -A | grep 'apt-get' mccrazy@Lenovo-N22:~$ ps -A | grep apt  1044 ? 

Doing sinatra basic api

15.Apr.2017 > Creating RVM file - cd projects\2017\ruby\doctor-is-in - rvm use --create --rvmrc 2.4.1@doctor-is-in > Create .GemFile -subl GemFile > Add item to GemFile *** source ' http://rubygems.org ' ruby "2.4.1" gem 'sinatra' gem "activerecord" gem "sinatra-activerecord" #Tells your Mac to use sqlite locally during development group :development do     gem 'sqlite3'     gem "tux" end #Tells heroku to use postgreSQL in production/live group :production do     gem 'pg' end *** > Install bundler - gem install bundler > Run bundler - bundle install > Clone viz project - git clone https://baliwme@bitbucket.org/baliwme/viz.git > Create config.ru *** # config.ru require './myapp' run Sinatra::Application *** > Open my good old reference - https://www.kylembrown.com/programming/sinatra-and-postgresql-perform-on-a-heroku-stage-tutorial > Create database-config.rb *** # database-config

Installing NVM - Node Version Manager on Ubuntu 16.04

12.Apr.2018 > Installing NVM - Node Version Manager on Ubuntu 16.04 - sude apt-get update - sudo apt-get install build-essential libssl-dev > Check latest nvm released - https://github.com/creationix/nvm/releases > At this time of installation the latest version is 0.33.1 - curl https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash > Refesh terminal - source ~/.profile > Check nvm version or if working - nvm --version

Delivery Status Notification (Failure)

08.Apr.2017 > Istall git - sudo apt install git > Set user config - git config --global user.email " you@example.com " - git config --global user.name "Your Name" > Install Mozilla Sqlite Manager AddOn - https://addons.mozilla.org/en- US/firefox/addon/sqlite- manager/ > Install Heroku Toolbelt -  sudo apt-get install software-properties-common - sudo add-apt-repository "deb https://cli-assets.heroku.com/ branches/stable/apt ./" - sudo apt-get update > Login to heroku - heroku login > Clone the repository - heroku git:clone -a games-job > Creating RVM files - rvm use --create --rvmrc 2.2.4@pcso-games-job > Install bundler - gem install bundler > Installed gems defined on the .Gemfile - bundle install ! Encountered error while running bundle install = No pg_config... trying anyway. If building fails, please try again with > Resolution: - sudo apt-get install libpq-dev 06.Apr.2017 > Update ubuntu software thru terminal - sud

MS SQL : Append new column with sequential numbers/id

<h3>-- PROPOSED:</h3> <pre> SELECT TOP 1000 [RankId]       ,[RankCode]       ,[RankName]       ,[ShortName]     ,rt.RankTypeCategoryCode   FROM   [eCrewDos].[Crewing].[Ranks] r   INNER JOIN [Crewing].[RankTypes] rt ON rt.RankTypeCode = r.RankType WHERE r.[IsDeleted] = 0 ORDER BY rt.RankTypeCategoryCode, RankCode --SortOrder </pre> <br/><br/><br/> <h3>-- PROPOSED with Row Number:</h3> <pre> SELECT TOP 1000 [RankId]  ,[RankCode]  ,[RankName]  ,[ShortName]  ,rt.RankTypeCategoryCode  , ROW_NUMBER() OVER(ORDER BY rt.RankTypeCategoryCode ASC, RankCode ASC) AS Row# FROM  [Crewing].[Ranks] r  INNER JOIN [Crewing].[RankTypes] rt ON rt.RankTypeCode = r.RankType WHERE r.[IsDeleted] = 0 ORDER BY rt.RankTypeCategoryCode, RankCode --SortOrder </pre>