Skip to content

Instantly share code, notes, and snippets.

View ChaituVR's full-sized avatar
💙
Working from home

Chaitanya ChaituVR

💙
Working from home
View GitHub Profile
@ChaituVR
ChaituVR / news.json
Created June 26, 2017 06:14
News example api
{
"status": "ok",
"source": "the-next-web",
"sortBy": "latest",
"articles": [
{
"author": "TNW Deals",
"title": "Get over 1.1 million graphics at your fingertips — for only $31",
"description": "Ask any art pro...finding a stockpile of quality vector graphics to incorporate into your own projects is worth its weight in gold. They’re high quality, they’re versatile, and ...",
"url": "https://thenextweb.com/offers/2017/06/25/get-1-1-million-graphics-fingertips-31/",
<div class="new-area">
<div class="row news-main" *ngFor="let article of articles | slice:0:1;">
<div class="col-md-12">
<div class="card card-inverse">
<img class="img-card img-fluid" src="{{article.urlToImage}}" alt="Card image">
<div class="card-img-overlay col-md-12">
<div class="card-content">
<h4 class="card-title">{{article.title}}</h4>
<p class="card-text">{{article.description}}</p>
</div>
[
{
"_id": "596076a3f6324c7650a5a4f2",
"index": 0,
"isActive": true,
"picture": "http://placehold.it/700x500",
"name": "PartName"
},
{
"_id": "596076a3a2d70e82a4fd7492",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<style>
.myIframe {
position: relative;
padding-bottom: 65.25%;
padding-top: 30px;
min-height:1000px;
overflow: hidden;
-webkit-overflow-scrolling:touch;
}
.myIframe iframe {
@ChaituVR
ChaituVR / Change.txt
Last active September 13, 2017 05:41
1) Open this file: app/design/frontend/rwd/default/template/configurableswatches/catalog/product/view/type/configurable/swatch-js.phtml
2) Change this:
<script type="text/javascript">
document.observe('dom:loaded', function() {
var swatchesConfig = new Product.ConfigurableSwatches(spConfig);
});
</script>
To this:
@ChaituVR
ChaituVR / gist:a382919df6a8152d06d90a757f5864bd
Last active March 1, 2019 19:06
GraphJS-server Installation
## Update to PHP-7
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2 php7.2-common php7.2-simplexml php7.2-mbstring php-bcmath
sudo a2dismod php5
sudo a2enmod php7.2
sudo service apache2 restart
php -v
## Install Bcmath extension
@ChaituVR
ChaituVR / Instructions.md
Last active June 3, 2020 11:55
Instructions

chartjs-to-image

Instructions to Deploy Script as a AWS Lambda function:

Create a Lambda Function:

  • Login to AWS Console and go to https://console.aws.amazon.com/lambda/home
  • Select Region and click "Create Function" button
  • Select "Auther from Scratch" and Give your function a name (ex: convert-chartjs-to-image)
This file has been truncated, but you can view the full file.
curl 'https://api-geth-archive.ankr.com/' \
-H 'Connection: keep-alive' \
-H 'Cache-Control: max-age=0' \
-H 'sec-ch-ua: "Google Chrome";v="93", " Not;A Brand";v="99", "Chromium";v="93"' \
-H 'Authorization: Basic YmFsYW5jZXJfdXNlcjpiYWxhbmNlckFua3IyMDIwMTAxNQ==' \
-H 'content-type: application/json' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'Origin: http://localhost:3000' \
-H 'Sec-Fetch-Site: cross-site' \
-H 'Sec-Fetch-Mode: cors' \
@ChaituVR
ChaituVR / README.txt
Created September 29, 2021 06:18
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS