This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recently viewed/accessed files on ubuntu system:- | |
awk -F"file://|\" " '/file:\/\// {print $2}' ~/.local/share/recently-used.xbel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
ShopifyApp.init({ | |
apiKey: '<?php echo APP_API_KEY; ?>', | |
shopOrigin: 'https://<?php echo $_SESSION['shop']; ?>', | |
forceRedirect: true | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since new EC2 instance already contains most of the tools required for Ruby on Rails 5.1 development. We have to run the command given below to setup environment. | |
rails new . -T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="/search" method="get" class="search-bar" role="search" style="text-align:left;"> | |
<button type="submit" class="btn" style="position:absolute; margin-left: 8px; margin-top: 6px;"> | |
<i class="fa fa-search"></i> | |
</button> | |
<input type="search" placeholder="Search articles" name="q" value="{{ search.terms | escape }}" style="height:32px; padding-left:25px; margin-top:20px; width:100%; border-radius:40px;"> | |
</form> | |
<div class="blog-newsletter"> | |
<img src="{{ 'msg_medium_blue.png' | asset_img_url: 'medium' }}" alt="No image"> | |
<h5>Join thousands of women who already have gotten stronger.</h5> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1:- Login as super user using command | |
=> sudo su | |
Step 2:- The ROR installation begins with installing RVM on the server. It is important to install the latest version of RVM on the system, this requires an installation of the CURL command. The following command does the job. | |
=> apt-get install curl | |
Step 3:- To proceed with the RVM installation, import the rvm.io public key in the server system using this command. | |
=> curl -#LO https://rvm.io/mpapis.asc | |
=> gpg --import mpapis.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When installing node and npm we may get error of "npm update failed" or "node-gyp/bin/node-gyp not found". | |
To overcome these errors we have to remove some files before uninstalling node. These are the instructions | |
a). sudo rm -rf /usr/local/bin/node-gyp | |
b). sudo rm -rf /usr/local/bin/npm | |
c). sudo rm -rf /usr/local/bin/npx | |
d). sudo rm -rf /usr/local/lib/node_modules/ | |
and cleaning node files in home directory, for precaution: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ques 1: Create a function named `customObjFlatten` which will take an pure nested object and return single level key value pair such as | |
INPUT | |
{ | |
a: 12, | |
b: 15, | |
c: { | |
d: 31, | |
e: { | |
f:51, | |
g: { |