Skip to content

Instantly share code, notes, and snippets.

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

Saiful Islam saifulapm

I may be slow to respond.
View GitHub Profile
@saifulapm
saifulapm / alacritty.md
Last active December 20, 2024 10:25
Alacritty: escape sequence

For example, from your terminal, if you run xxd -psd and press ctrl-f v and then enter and finally ctrl-c to exit, it outputs the following:

$ xxd -psd
^Fv
06760a^C

What matters is the sequence 06760a^C. Let's split it every two characters:

@saifulapm
saifulapm / match_visual.vim
Created September 30, 2024 18:10 — forked from AndrewRadev/match_visual.vim
Match other instances of visually selected areas
" Install by saving as plugin/match_visual.vim in your Vim (or Neovim) config
" directory.
"
" Reimplementation of https://github.com/aaron-p1/match-visual.nvim
"
" Requires the function `getregion`, you have it if this expression prints 1:
"
" echo exists('*getregion')
"
if !exists('*getregion')
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
-- Move to window using the <ctrl> hjkl keys
vim.keymap.set("i", "<A-h>", "<left>", { desc = "Go to left" })
vim.keymap.set("i", "<A-j>", "<Down>", { desc = "Go to lower" })
vim.keymap.set("i", "<A-k>", "<Up>", { desc = "Go to upper" })
vim.keymap.set("i", "<A-l>", "<Right>", { desc = "Go to right" })
-- Move to window using the <ctrl> hjkl keys
return {
{
"akinsho/bufferline.nvim",
opts = {
options = {
show_close_icon = false,
show_buffer_close_icons = false,
diagnostics = false,
hover = { enabled = false },
},
[
{
"id": 829,
"make": "GMC",
"model": "Suburban",
"submodel": "",
"engine": "",
"year": 1955
},
{
export const dataConfig = {
packages: [
{
name: 'Starter',
price: 3000,
description: 'Our starter pack offers a streamlined visualisation of your idea',
services: [
{
title: 'Concept development',
list: [
@saifulapm
saifulapm / page.google-product-feed.liquid
Created October 16, 2021 03:50 — forked from cameroncowden/page.google-product-feed.liquid
Shopify Google Product Feed xml generator
{% comment %}
Instructions:
- Create a blank page called 'Google Base Product Feed'and save it
- Open that page for editing and select 'page.google-feed' from the page template selector
- Add a brief site description to the meta-shop-description snippet
- The feed url should now be available at http://www.yoursite.com/pages/google-base-product-feed
- validate your field at http://validator.w3.org/feed/
- when ready, submit your feed at http://base.google.com
var dataProducts = [];
var totalProducts = 0;
var dataLoaded = false;
var totalPage = 0;
var totalUpdated = 0;
var maxLimit = 13000;
function getCategory(type, total = 0) {
var brand = $("#brand option:selected").val();
var year = $("#years option:selected").val();
var make = $("#make option:selected").val();
var dataProducts = [];
var totalProducts = 0;
var dataLoaded = false;
var totalPage = 0;
var maxLimit = 13000;
function getCategory(type, total = 0) {
var brand = $("#brand option:selected").val();
var year = $("#years option:selected").val();
var make = $("#make option:selected").val();
var model = $("#model option:selected").val();
var syncStore = {
action: "syncNow",
token: ''
};
function startSyncStore(callback) {
$.ajax({
type: 'POST',
url: "/sync",
dataType: 'json',