Skip to content

Instantly share code, notes, and snippets.

pradhumnsharma

Block or report user

Report or block pradhumnsharma

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pradhumnsharma
pradhumnsharma / npm and node-gyp errors
Created May 10, 2018
Node and npm related issues
View npm and node-gyp errors
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:
@pradhumnsharma
pradhumnsharma / Rails Installation commands
Created Apr 19, 2018
How to install rails on localhost?
View Rails Installation commands
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
View ajaxify mailchimp
<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>
@pradhumnsharma
pradhumnsharma / Rails command
Last active Mar 31, 2018
How to deploy rails environment in aws cloud9 ?
View Rails command
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
@pradhumnsharma
pradhumnsharma / Shopify app
Created Mar 30, 2018
How to open shopify app in app page on store
View Shopify app
<script type="text/javascript">
ShopifyApp.init({
apiKey: '<?php echo APP_API_KEY; ?>',
shopOrigin: 'https://<?php echo $_SESSION['shop']; ?>',
forceRedirect: true
});
</script>
@pradhumnsharma
pradhumnsharma / Ubuntu commands
Created Mar 22, 2018
Important linux commands
View Ubuntu commands
Recently viewed/accessed files on ubuntu system:-
awk -F"file://|\" " '/file:\/\// {print $2}' ~/.local/share/recently-used.xbel
@pradhumnsharma
pradhumnsharma / add_fb_page.txt
Last active Mar 15, 2018
How to add facebook page on website?
View add_fb_page.txt
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FYOUR-FB-PAGE-ID&width=600&colorscheme=light&show_faces=true&border_color&stream=true&header=true&height=435" scrolling="yes" style="border:none; overflow:hidden; width:600px; height:430px; background: white; float:left; " allowtransparency="true" frameborder="0"></iframe>
You can’t perform that action at this time.