Skip to content

Instantly share code, notes, and snippets.

SELECT * FROM `table` WHERE shop_name = 'shopname' AND `table`.`is_delete` = 0 ORDER BY `table`.`id` LIMIT 10
SELECT * FROM `table` WHERE shop_name = 'shopname' AND `table`.`id` > 11087349 AND `table`.`is_delete` = 0 ORDER BY `table`.`id` LIMIT 10
SELECT * FROM `table` WHERE shop_name = 'shopname' AND `table`.`id` > 11087359 AND `table`.`is_delete` = 0 ORDER BY `table`.`id` LIMIT 10
@fimars
fimars / skip-xdg-open.bash
Created December 27, 2024 06:45
xdg-open error
mkdir ~/tmp-bin && export PATH=$PATH:~/tmp-bin && echo "#!/bin/sh" > ~/tmp-bin/xdg-open && chmod +x ~/tmp-bin/xdg-open
@fimars
fimars / spring.tsx
Created December 31, 2024 19:14
spring, scrollvalue, test
import React, { useRef, useEffect, useState } from 'react';
// useScrollValue 钩子
function useScrollValue() {
const [scrollY, setScrollY] = useState(window.scrollY);
useEffect(() => {
const handleScroll = () => {
window.requestAnimationFrame(() => setScrollY(window.scrollY));
};
@fimars
fimars / ace-theme.json
Created January 5, 2025 11:07
Ace in vscode
{
"name": "Ace-TM Theme",
"type": "dark",
"colors": {
"editor.background": "#352e3c",
"editor.foreground": "#d6dbd8",
"editorGutter.background": "#352e3c",
"editorGutter.foreground": "#7d817f",
"editorCursor.foreground": "#eee",
"editor.lineHighlightBackground": "rgba(0, 0, 0, 0.07)",
SELECT
*
FROM
people
WHERE
(
(first_name > 'Aaron') -- Names after Aaron
OR
(first_name = 'Aaron' AND id > 25995) -- Aarons, but after the last id that the user saw
)