Skip to content

Instantly share code, notes, and snippets.

View chuckis's full-sized avatar
🔍
In the beginning was the Word,

chuckis

🔍
In the beginning was the Word,
  • 10:28 (UTC +03:00)
View GitHub Profile
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active April 15, 2025 05:07
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework Usage Guide

This guide explains how to use the structured prompting files (core.md, refresh.md, request.md) to optimize your interactions with Cursor AI, leading to more reliable, safe, and effective coding assistance.

Core Components

  1. core.md (Foundational Rules)
    • Purpose: Establishes the fundamental operating principles, safety protocols, tool usage guidelines, and validation requirements for Cursor AI. It ensures consistent and cautious behavior across all interactions.
    • Usage: This file's content should be persistently active during your Cursor sessions.
from typing import TypeVar, Any, Protocol, Sequence, Generic
class Comparable(Protocol):
def __lt__(self, param: Any) -> bool:
...
def __gt__(self, param: Any) -> bool:
...
@veleek
veleek / phaserstuff.js
Last active January 23, 2025 11:08
Phaser Tile/World/Object XY conversions for orthogonal maps.
/**
* Get the world XY position of a tile that takes into account the offset of the container with this map in it.
* This returns the origin of the tile sprite which is 64x64 whereas the actual tilemap tile size is only 64x32, so
* the world position is actually outside of the individual tile bounds. The tiles overlap in the isometric grid
* though so we only really care about the specific point.
* @param tileX
* @param tileY
*/
public tileToWorldXY(tileX: number, tileY: number): Phaser.Math.Vector2 {
const worldPos = this.map.tileToWorldXY(tileX, tileY, null, null, "floor");

Logseq Plugin Setup Guide

[WIP] Logseq Plugin System is currently under Alpha Testing phase.

For Developers

In this short guide, it will walk you through the steps needed to set up your development environment for writing and running a hello world simple inside of Logseq Desktop Client. You know Logseq Plugin based on Web Technologies composed of JS & HTML & CSS, but neither are mandatory, you can develop plugins use any language which can be translated to javascript (Logseq made by Clojurescript!). We will use Typescript to demonstrate this sample. Because there is a type definition file to make development experience even better.

Install Node.js and NPM

@gusenov
gusenov / git-cheat-sheet.sh
Last active September 20, 2024 11:55
Шпаргалка по Git.
#---------------------------------------------------------------------
# НАСТРОЙКИ
#---------------------------------------------------------------------
# Показать глобальную конфигурацию:
git config --global --list
git config --local user.name "user name"
git config --local user.email "[email protected]"
git config --local core.fileMode false
@gireesh092
gireesh092 / database_helper.dart
Created April 6, 2019 12:23
Flutter : Database helper boiler code
import 'package:sqflite/sqflite.dart';
import 'dart:async';
import 'dart:io';
import 'package:path_provider/path_provider.dart';
import 'package:notebuddy/models/note.dart';
class DatabaseHelper {
static Database _database;
static DatabaseHelper _databaseHelper; //SINGLETON DBHELPER
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active February 22, 2025 10:42
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

Keybase proof

I hereby claim:

  • I am satyrius on github.
  • I am satyrius (https://keybase.io/satyrius) on keybase.
  • I have a public key ASCqBYyDDIvy2Yj556khOSWkpKP3Gr-T1r71iu7RW3_9xQo

To claim this, I am signing this object:

@brenopolanski
brenopolanski / export-svg-inkscape.md
Created December 26, 2017 13:29
Exporting an object as svg from inkscape
  1. Select the object(s) to export
  2. Open the document properties window (Ctrl+Shift+D)
  3. Select "Resize page to drawing or selection"
  4. File > Save As Copy...
  5. Select Optimized SVG as the format if you want to use it on the web
@sashachabin
sashachabin / #КР № 2 (ФО-350005, Васильев А., Чабин А.)
Last active September 30, 2021 18:57
УрФУ. Разработка бота в Telegram с Webhook. Создание админки на Flask-Admin
ФО-350005
Васильев А.М.
Чабин А.С.
Презентация:
https://docs.google.com/presentation/d/1fNtX24els90-WxOUPl1M_pt7j8pQ-TnHcSDGx08KcRc/edit?usp=sharing
Разработка бота в Telegram с Webhook. Создание админки на Flask-Admin
(продолжение доклада bit.ly/urfu_botapi)
--------------------------------------