Skip to content

Instantly share code, notes, and snippets.

@negati-ve
negati-ve / gist:eaac0bf4dd10ce1291b14d3020307a2a
Last active September 10, 2024 09:14
Get DSC/Digital Signature USB Stick working on Mac OS India for Digitally signing MCA, GST and other legal documents
- https://www.e-mudhra.com/Repository/
Download token driver
HyperPKI HYP 2003 Auto (MAC) New v3 (tested to be working on M1 as of 2024 Sep)
- install and reconnect your usb stick
at this point you can sign acrobat docs
for chrome/web browser based signing
- https://embridge.emudhra.com/ download mac embridge
@negati-ve
negati-ve / queue-job-collection.js
Created January 8, 2024 18:57
queue-job collection model sample
module.exports = {
attributes: {
type: {
type: 'string',
required: true,
// Example: "binance_withdrawal_txn_id_lookup", "update_user_txn_id", "upload_some_file"
// job runner needs to read this field and decide what is to be done
},
description: {
type: 'string',
about:config
toolkit.legacyUserProfileCustomizations.stylesheets true
https://github.com/BPower0036/UserChrome/tree/FireFox-117
@negati-ve
negati-ve / mysql-docker.sh
Created March 16, 2023 17:42 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@negati-ve
negati-ve / addAccount.txt
Last active November 16, 2022 08:08
Add SMTP mail inside gmail.com
To add official accounts to your normal personal gmail(not CX GSuite/GWorkspace),
1. Goto Gmail settings
2. Click on "Accounts and Imports" tab
3. under "Send mail as:" -> click "Add another email"
4. Enter your name and email: xx@instadukan.com and click next
5. Enter your username: xx@instadukan.com
5. Enter your pass: xxxx
6. Click Add account and let me know, Will share a confirmation code with you
@negati-ve
negati-ve / gist:e13e68d27a595ceb0a3818f8f5af6c67
Created October 13, 2022 08:38
purge/clean logs docker mac
echo "rm /var/lib/docker/containers/*/*.log" | nc -U -w 0 ~/Library/Containers/com.docker.docker/Data/debug-shell.sock
@negati-ve
negati-ve / ferrybooking-changelog-recommendations.md
Last active August 31, 2022 15:31
ferrybooking 31/08/2022

changeLog

  • Created GA4 Analytics account
  • Connected to Universal Analytics account
  • Added GA4 tag
  • Remove webengage, GA, fullstory, hotjar from book/ferry-booking.php
  • Remove webengage, GA, fullstory, hotjar from book/boat-booking.php
  • Install GTM in book/ferry-booking.php
  • Install GTM in book/boat-booking.php
  • GTM configured (release v2)
ssh -D 9998 -q -C -N root@server.com
apk add git openssh;
mkdir ~/.ssh/;
cd ~/.ssh && ssh-keygen;
eval `ssh-agent -s`;
ssh-add;
echo "Host *\
StrictHostKeyChecking no\
UserKnownHostsFile /dev/null\
LogLevel ERROR" > ~/.ssh/config;
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
@negati-ve
negati-ve / gist:8568b93ffa3c387e18462445cbad8ed0
Created March 26, 2022 14:32
Generate ethereum EIP-712 typed data signature
const Web3 = require('web3');
const metaMaskUtils = require('@metamask/eth-sig-util');
(async () => {
const myPrivateKeyHex = "xxx";
let msg = '';
console.log("message: " + JSON.stringify(msg))
const privateKey1Buffer = Buffer.from(myPrivateKeyHex, 'hex')
const sign_2 = metaMaskUtils.signTypedData({ data: msg, privateKey: privateKey1Buffer, version: 'V4' })
let whoSigned1 = metaMaskUtils.recoverTypedSignature({ data: msg, signature: sign_2, version: 'V4' })