Skip to content

Instantly share code, notes, and snippets.

@boredzo
boredzo / skew.scad
Created January 5, 2016 06:02
Skew operator for OpenSCAD
/*skew takes an array of six angles:
*x along y
*x along z
*y along x
*y along z
*z along x
*z along y
*/
module skew(dims) {
matrix = [
@stevecondylios
stevecondylios / resize-image-in-github-issue-github-flavored-markdown.md
Last active March 5, 2025 22:17
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown)

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

@nazreen
nazreen / index.ts
Last active March 5, 2025 22:19
find deployed programs
import { Connection, PublicKey } from '@solana/web3.js';
import { promises as fs } from 'fs';
import path from 'path';
import bs58 from 'bs58';
// to run this script, do `npx tsx index.ts <YOUR_ADDRESS>`
// --- Constants & Types ---
const RPC_URL = 'https://api.devnet.solana.com';
const CACHE_DIR = path.join(__dirname, 'cache');
@entrepeneur4lyf
entrepeneur4lyf / structured-decision-optimization-cline
Created March 3, 2025 04:12
Structured Decision Optimization Framework (RL-inspired) - for Cline
<Prompt>
<Context>
You're tasked with coding a project and need to follow specific guidelines to ensure quality and consistency across various programming languages and frameworks.
</Context>
<Progress>
Document all tasks. Create a folder in the project root named .cline and keep a log of tasks in the following format.
GOAL: Detail the goal of the task
IMPLMENTATION: Describe how it was implemented.
import androidx.compose.animation.core.AnimationSpec
import androidx.compose.animation.core.animate
import androidx.compose.animation.core.tween
import androidx.compose.foundation.gestures.ScrollableState
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.runtime.saveable.Saver
@maratori
maratori / .golangci.yml
Last active March 5, 2025 22:15
Golden config for golangci-lint
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021-2025 Marat Reymers
## Golden config for golangci-lint v1.64.6
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt it to suit your needs.
# If this config helps you, please consider keeping a link to this file (see the next comment).
@VictorTaelin
VictorTaelin / spec.md
Created February 26, 2025 15:51
SupTT Spec

The Interaction Calculus

The Interaction Calculus (IC) is term rewriting system inspired by the Lambda Calculus (λC), but with some major differences:

  1. Vars are affine: they can only occur up to one time.
  2. Vars are global: they can occur anywhere in the program.
  3. There is a new core primitive: the superposition.

An IC term is defined by the following grammar:

@forstie
forstie / Generating spreadsheets with SQL.sql
Last active March 5, 2025 22:14
In this working example, we establish an SQL table which contains the spreadsheets we'd like to have generated. Each row in the table includes the query that will supply the data for the spreadsheet, and the location in the IFS where the spreadsheet should reside. Further, a different procedure emails the spreadsheets to an interested consumer. …
-- =================================================================
-- Author: Scott Forstie
-- Email : [email protected]
-- Date : January 10, 2020
-- =================================================================
--
-- Setup:
-- 1) create and populate the spreadsheet generator table
-- 2) change the procedure source code:
@h3ssan
h3ssan / JetBrains trial reset.md
Last active March 5, 2025 22:13
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@voxxit
voxxit / hashicorp.consul.server.plist
Created August 7, 2015 22:01
LaunchAgent for Consul & Consul UI
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>hashicorp.consul.server</string>
<key>ProgramArguments</key>
<array>