Skip to content

Instantly share code, notes, and snippets.

View rahuls360's full-sized avatar
🎯
Focusing

Rahul Makhija rahuls360

🎯
Focusing
  • Bengaluru
View GitHub Profile
// @ts-ignore
wrong code goes here
@rahuls360
rahuls360 / gist:950c38a9e3d3cf69eb59200b8838d553
Created September 11, 2019 05:14
styled components props destructuring
${({ hide }) => hide ? "none" : "block"};
@rahuls360
rahuls360 / gist:7d8ebebab0a604d067e0ecf5477579d8
Created August 16, 2019 11:56
react datatable starter code
getDataTable = () => {
let rowData = [
[1, 2],
[2, 3]
];
let extraOptions = {
tableName: '',
rowHeight: "32px",
rowBorder: true,
@rahuls360
rahuls360 / gist:81949a7fabd509a158f88e39fe27a94b
Created April 20, 2019 14:26
convert index to array loop - map function
Array.from(Array(5).keys()).map(index => (
console.log(index)
))
@rahuls360
rahuls360 / gist:4cebbf9bd2a1d60f5ba78114cd52d8c9
Created February 27, 2019 05:26
checkout old branch as master
git checkout <OLD_COMMIT>
git branch temp
git checkout temp
git branch -f master temp
git checkout master
git branch -d temp
git push origin master -f
@rahuls360
rahuls360 / gist:760fe3b5a1aba067c5839c33456f3e5b
Last active February 28, 2019 05:37
include bootstrap in reactjs
import 'bootstrap/dist/css/bootstrap.css';
if (typeof window !== 'undefined') {
window.jQuery = window.$ = require('jquery');
require('bootstrap');
}
ini_set ('display_errors', 'on');
ini_set ('log_errors', 'on');
ini_set ('display_startup_errors', 'on');
ini_set ('error_reporting', E_ALL);
@rahuls360
rahuls360 / gist:3501e093ecff7d656a0b8d00dc41cc69
Last active January 15, 2019 07:30
Google Recaptcha form
Paste in <head>
<script src='https://www.google.com/recaptcha/api.js'></script>
Google Recaptcha widget
<div class="g-recaptcha" data-sitekey="_______________PUBLIC_KEY_______________"></div>
Recaptcha verification
<?php
if(isset($_POST['submit'])){
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Service",
"name": "Company Google Business Page Name",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.6",
"bestRating": "5",
"ratingCount": "29"
@rahuls360
rahuls360 / gist:fcbe081ca06cdf3ec63a884135c7e08f
Created December 24, 2018 10:59
JSON LD - GTM - Google Structured Data Testing tool [INTEGRATION]
<script>
(function()
{
var data = {
ADD SCHEMA INFORMATION
}
var script = document.createElement('script');
script.type = "application/ld+json";