Skip to content

Instantly share code, notes, and snippets.

View ram4git's full-sized avatar

Ram ram4git

View GitHub Profile
@ram4git
ram4git / info.sql
Last active March 9, 2017 09:35
PSQL DUMP AND RESTORE
#DUMP
pg_dump <DB_NAME> -U <USER_NAME> | gzip > <FILE_NAME>.gz
#RESTORE
gunzip -c <FILE_NAME>.gz | psql <DB_NAME>
crontab -e */15 * * * * say `curl -s http://catfacts-api.appspot.com/api/facts |python -mjson.tool|grep facts -a1|tail -n1`
@ram4git
ram4git / webpack.prod
Created May 7, 2019 02:23
Webpack Compression
/* global __dirname */
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const CompressionPlugin = require('compression-webpack-plugin');
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin({branchCommand: 'rev-parse --symbolic-full-name HEAD'});
@ram4git
ram4git / bigSquare.html
Created April 16, 2020 02:16
WithBiggerSquare
<div id="curator-feed-sandbox-layout"></div>
<script type="text/javascript">
/* curator-feed-sandbox-layout */
(function() {
var i, e, d = document,
s = "script";
i = d.createElement("script");
i.async = 1;
i.src = "https://cdn.curator.io/published/d85b878e-0ede-4436-8198-ed1eba1d7482.js";
e = d.getElementsByTagName(s)[0];
@ram4git
ram4git / NineSquare.html
Created April 16, 2020 02:27
With 9 squqre
<div id="curator-feed-sandbox-layout"></div>
<script type="text/javascript">
/* curator-feed-sandbox-layout */
(function() {
var i, e, d = document,
s = "script";
i = d.createElement("script");
i.async = 1;
i.src = "https://cdn.curator.io/published/d85b878e-0ede-4436-8198-ed1eba1d7482.js";
e = d.getElementsByTagName(s)[0];
<!DOCTYPE html>
<html>
<head>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@200&display=swap"
rel="stylesheet"
/>
<link
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
const [routeLunchawalaMap, setRouteLunchwalaMap] = useState({});
useEffect(() => {
const nRouteLunchawalaMap = {};
db.collection('/routeAllocation').forEach((doc) => {
nRouteLunchawalaMap[doc.id] = [doc.lunchwalaId]
export const reportException = async (exception, reportToAppCenter = true) => {
const {appVersion, label} = await codePush.getUpdateMetadata() || {};
try {
if (reportToAppCenter) {
Analytics.trackEvent(`Exception Occured ===> ${exception}`);
}
} catch {