Skip to content

Instantly share code, notes, and snippets.

View sarpavci's full-sized avatar
🦎
c h a m e l e o n

Sarp AVCI sarpavci

🦎
c h a m e l e o n
View GitHub Profile
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active December 31, 2025 03:26
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.

The Autonomous Agent Prompting Framework

This repository contains a disciplined, evidence-first prompting framework designed to elevate an Agentic AI from a simple command executor to an Autonomous Principal Engineer.

The philosophy is simple: Autonomy through discipline. Trust through verification.

This framework is not just a collection of prompts; it is a complete operational system for managing AI agents. It enforces a rigorous workflow of reconnaissance, planning, safe execution, and self-improvement, ensuring every action the agent takes is deliberate, verifiable, and aligned with senior engineering best practices.

I also have Claude Code prompting for your reference: https://gist.github.com/aashari/1c38e8c7766b5ba81c3a0d4d124a2f58

@nikoheikkila
nikoheikkila / README.md
Last active December 14, 2025 01:16
Fish Shell function for sourcing standard .env files

envsource

⚠️ NOTE (20.5.2023): I don't really use this function at all anymore since there are now tools such as Taskfile, which reads the .env file for me sparing me the need to pollute my session with environment variables.


I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.

When attempting to run source .env in a project, I usually encounter this problem:

@waimea-cpy
waimea-cpy / random-filename.php
Last active March 6, 2025 09:00
PHP Random Filename - PHP function to generate random filename with same extension as given filename, e.g. to avoid filename collisions when uploading
<?php
/*-------------------------------------------------------------
* Generate a random 32 character filename with same extension
* (including no extension) as the filename provided
*-------------------------------------------------------------*/
function randomFilename( $originalFilename ) {
$filenameParts = explode( '.', $originalFilename ); // Break apart the filename
$fileExtension = $filenameParts[sizeof($filenameParts) - 1]; // To get the file extension
@tobi-1807
tobi-1807 / CurrencyCode.enum.ts
Created March 7, 2020 08:14
Currency Code enums for Typescript
export enum CurrencyCode {
USD = 'USD',
CAD = 'CAD',
EUR = 'EUR',
AED = 'AED',
AFN = 'AFN',
ALL = 'ALL',
AMD = 'AMD',
ARS = 'ARS',
AUD = 'AUD',
@iksi
iksi / hex-to-hsl.php
Created April 18, 2018 10:44
convert hex to hsl
<?php
// http://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/
// convert hex to hsl
$hex = str_split(ltrim('#0099cc', '#'), 2);
// convert the rgb values to the range 0-1
$rgb = array_map(function($part) {
return hexdec($part) / 255;
@beatfactor
beatfactor / install_nginx_macos_source.md
Last active February 6, 2025 14:20
Install Nginx on Mac OS from source (without brew)

Install Nginx on Mac OS from source

no Homebrew required

1. Download Nginx

$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
@exAspArk
exAspArk / self-signed-ssl-mongo.sh
Last active October 28, 2025 14:43
Self-signed SSL Certificate with OpenSSL on MacOS | MongoDB
openssl genrsa -out CAroot.key 2048
openssl req -new -key CAroot.key -out CAroot.csr # CN should be different from the certificates below
openssl req -x509 -days 1825 -key CAroot.key -in CAroot.csr -out CAroot.crt
cat CAroot.crt CAroot.key > CAroot.pem
openssl genrsa -out mongod.key 2048
openssl req -new -key mongod.key -out mongod.csr
openssl x509 -req -days 1825 -in mongod.csr -CA CAroot.pem -CAkey CAroot.key -CAcreateserial -out mongod.crt
cat mongod.crt mongod.key > mongod.pem
@mujdatcicek
mujdatcicek / netgsm.go
Last active May 6, 2017 10:23
NETGSM SMS gönderimi için go örneği
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
@dverbovyi
dverbovyi / gulpfile.js
Last active January 19, 2021 12:41
ES6 project with Gulp, Sass, Babel & Browserify
/**
* Created by Dmytro on 3/27/2016.
*/
var browserify = require('browserify'),
gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
source = require('vinyl-source-stream'),
buffer = require('vinyl-buffer'),
@natchiketa
natchiketa / a Super-simple Nginx reverse proxy with Homebrew on OS X.md
Last active May 18, 2023 04:54
Super-simple Nginx reverse proxy with Homebrew on OS X

Installation

1)

brew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgents

2)

Replace /usr/local/etc/nginx/nginx.conf with the nginx.conf in this gist. I'm using port 5000 for my current project. Obviously, change server_name as well, and probably the name of its access log.