Skip to content

Instantly share code, notes, and snippets.

@amkarthik
amkarthik / freehand-payment-page.js
Created May 27, 2026 18:19
freehand-payment-js
/**
* Unified Frontend interactions for Freehand Freight Solutions Page
*/
// 1. MOBILE RESPONSIVE NAVIGATION HAMBURGER SYSTEM
(function () {
var btn = document.getElementById('nav-hamburger');
var menu = document.getElementById('mobile-nav');
if (!btn || !menu) return;
@amkarthik
amkarthik / freehand-payment-page-head.css
Last active May 27, 2026 18:04
freehand-payment-page-head
/* ── FORM VALIDATION ── */
.form-group input.input-error {
border-color: #E53935 !important;
background: #fff5f5 !important;
box-shadow: 0 0 0 3px rgba(229,57,53,0.12) !important;
}
.field-error {
display: none;
color: #E53935;
font-size: 12px;
@amkarthik
amkarthik / ssh-doodba.txt
Created December 12, 2022 10:48
ssh-doodba.txt
1. Generate ssh key
ssh-keygen -t ed25519 -C "<comment>"
2. add public key in git repo or account if needed
3. Run key-scan on repo
ssh-keyscan gitlab.com >> known_hosts
var FieldBinaryImage = AbstractFieldBinary.extend({
description: _lt("Image"),
fieldDependencies: _.extend({}, AbstractFieldBinary.prototype.fieldDependencies, {
__last_update: {type: 'datetime'},
}),
template: 'FieldBinaryImage',
placeholder: "/web/static/src/img/placeholder.png",
events: _.extend({}, AbstractFieldBinary.prototype.events, {
'click img': function () {
@amkarthik
amkarthik / update-parent-table-using-the-value-in-child-table.txt
Created May 6, 2020 10:00
update-parent-table-using-the-value-in-child-table.txt
update account_move am set accounting_unit = aml.subscription_id from account_move_line aml where aml.move_id = am.id and aml.subscription_id is not null;
--at first create a db {db_name}
createdb -O {user} -h {host} -p {port} -U {user} -W {db_name}
--then run the dump.sql like the below command.
psql -d {db_name} -h {host} -p {port} -U {user} -W < dump.sql
@amkarthik
amkarthik / chrome-with-custom-timezone.sh
Created October 21, 2019 08:20
chrome-with-custom-timezone.sh (Linux)
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
def cron_spawn(self):
""" Start the above runner function in a daemon thread.
The thread is a typical daemon thread: it will never quit and must be
terminated when the main process exits - with no consequence (the processing
threads it spawns are not marked daemon).
"""
# Force call to strptime just before starting the cron thread
# to prevent time.strptime AttributeError within the thread.
2017-10-20 06:40:42,099 1859 ERROR Master_10 odoo.addons.fetchmail_folder.models.fetchmail: Failed to process mail with Mailbox UID - 1507 from imap server Annadurai.
Traceback (most recent call last):
File "/opt/odoo-10/sodexis_modules/fetchmail_folder/models/fetchmail.py", line 167, in fetch_mail
strip_attachments=(not server.attach),
File "/opt/odoo-10/10.0/addons/mail/models/mail_thread.py", line 1281, in message_process
routes = self.message_route(msg_txt, msg, model, thread_id, custom_values)
File "/opt/odoo-10/10.0/addons/mass_mailing/models/mail_thread.py", line 31, in message_route
return super(MailThread, self).message_route(message, message_dict, model, thread_id, custom_values)
File "/opt/odoo-10/10.0/addons/mail/models/mail_thread.py", line 1169, in message_route
update_author=True, assert_model=True)
@amkarthik
amkarthik / index.coffee
Created March 14, 2016 15:16
atom-beautify
_ = require('lodash')
_plus = require('underscore-plus')
Promise = require('bluebird')
Languages = require('../languages/')
path = require('path')
logger = require('../logger')(__filename)
{EventEmitter} = require 'events'
# Lazy loaded dependencies
extend = null