Skip to content

Instantly share code, notes, and snippets.

View vikas5914's full-sized avatar
💭
I may be slow to respond.

Vikas Kapadiya vikas5914

💭
I may be slow to respond.
View GitHub Profile
@vikas5914
vikas5914 / whatsapp.json
Created February 21, 2023 06:49
whatsapp.json
{
"version": "2.2306.9",
"description": "A cross-platform messaging and Voice over IP service.",
"homepage": "https://www.whatsapp.com",
"license": {
"identifier": "Freeware",
"url": "https://www.whatsapp.com/legal/"
},
"architecture": {
"64bit": {
@vikas5914
vikas5914 / gist:8ff8b25b3045bc110a6704e0d7632237
Created April 22, 2021 10:08
K6 Load testing Laravel Echo Server
import ws from 'k6/ws'
import { check } from 'k6'
export const options = {
stages: [
{ duration: '30s', target: 100 },
{ duration: '2m', target: 1000 },
{ duration: '2m', target: 2000 },
{ duration: '2m', target: 3000 },
{ duration: '1m', target: 0 }
@vikas5914
vikas5914 / build.sh
Last active August 7, 2024 13:00
Build Static Mozjpeg 4 on Debian Ubuntu Mint
#!/bin/sh
set -e
# Script was created from https://github.com/a-vrma 's docker script.
# Ref: https://github.com/imagemin/mozjpeg-bin/pull/57
sudo apt-get update -y
sudo apt-get install -y build-essential nasm cmake ninja-build curl libpng-dev libpng-tools zlib1g-dev
mozjpeg_version=4.1.1
@vikas5914
vikas5914 / disable-inspect.js
Created April 16, 2020 06:10
Disable Inspect
<script type="text/javascript">
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(3(){(3 a(){8{(3 b(2){7((\'\'+(2/2)).6!==1||2%5===0){(3(){}).9(\'4\')()}c{4}b(++2)})(0)}d(e){g(a,f)}})()})();',17,17,'||i|function|debugger|20|length|if|try|constructor|||else|catch||5000|setTimeout'.split('|'),0,{}))
</script>
@vikas5914
vikas5914 / index.js
Created February 4, 2019 17:00
Exit App in React Navigation
const AppNavigator = createStackNavigator(
{
Screen: Screen,
Login: Login,
Intro: Intro,
},
{
initialRouteName: 'Screen',
transitionConfig,
navigationOptions: {
@vikas5914
vikas5914 / makeCert.bat
Created January 22, 2018 13:02
Generate a self-signed certificate for localhost
@echo off
REM IN YOUR SSL FOLDER, SAVE THIS FILE AS: makeCERT.bat
REM AT COMMAND LINE IN YOUR SSL FOLDER, RUN: makecert
REM IT WILL CREATE THESE FILES: example.cnf, example.crt, example.key
REM IMPORT THE .crt FILE INTO CHROME Trusted Root Certification Authorities
REM REMEMBER TO RESTART APACHE OR NGINX AFTER YOU CONFIGURE FOR THESE FILES
REM PLEASE UPDATE THE FOLLOWING VARIABLES FOR YOUR NEEDS.
SET HOSTNAME=example
@vikas5914
vikas5914 / pre-commit
Created July 14, 2017 10:47
Git Pre commit DB export hook
#!/bin/bash
DBUSER=""
DBPASS=""
DB=""
SCHEMAPATH=""
DATE=$(date +"%d-%m-%Y-%H-%M-%p")
if [ ! -d "$SCHEMAPATH" ]; then
mkdir $SCHEMAPATH
fi

Keybase proof

I hereby claim:

  • I am vikas5914 on github.
  • I am marcus5914 (https://keybase.io/marcus5914) on keybase.
  • I have a public key ASACov_9otsbe158tgJcrkAhT59diSCNZhqCzAmQOt6XBgo

To claim this, I am signing this object:

@vikas5914
vikas5914 / log.js
Last active December 12, 2023 14:09
Custom Logger Library with winston
const { createLogger, format, transports } = require('winston')
const moment = require('moment')
// set default log level.
const logLevel = 'info'
var logger = createLogger({
level: logLevel,
levels: {
fatal: 0,
function woocommerce_paypal_args_for_inr($paypal_args){
if ( $paypal_args['currency_code'] == 'currency_code'){
$convert_rate = currency_rate; // $1 = how much
$count = 1;
while( isset($paypal_args['amount_' . $count]) ){
$paypal_args['amount_' . $count] = round( $paypal_args['amount_' . $count] / $convert_rate, 2);
$count++;
}