Skip to content

Instantly share code, notes, and snippets.

@nishantmodak
nishantmodak / nginx.conf.default
Last active March 2, 2025 13:51
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active March 2, 2025 13:50
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active March 2, 2025 13:49
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@kriscamilleri
kriscamilleri / generate-llm-file.cjs
Last active March 2, 2025 13:48
Concatenate files within a project into single file for parsing by LLMs
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const minimist = require('minimist');
// Parse command-line arguments
const argv = minimist(process.argv.slice(2), {
string: ['path', 'file-types', 'output-file'],
alias: {
@valyakuttan
valyakuttan / remove_grub_from_windows11.md
Last active March 2, 2025 13:47
How to remove GRUB from Windows 11
@charelF
charelF / How to use Minion Pro in Overleaf.md
Last active March 2, 2025 13:43
Using Minion Pro in Overleaf in 2022

Using Minion Pro in Overleaf in 2022

Small guide on the most easy way to use Minion Pro in Overleaf, avoiding all the uncessary / outdated steps (such as e.g. using the MinionPro package, which does not work in Overleaf, or dealing with .sty files)

Get Minion Pro

Follow these steps if you dont have Minion Pro yet.

  1. Download and Install Adobe Reader
  2. Locate the font: On MacOS, it can be found here: /Applications/Adobe Acrobat Reader DC.app/Contents/Resources/Resource/Font. On other operating systems its probably similar.
@DanDiplo
DanDiplo / JS-LINQ.js
Last active March 2, 2025 13:40
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@amilos
amilos / KebabCaseNamingStrategy.cs
Created October 9, 2017 16:56
Kebab case naming strategy extension for Newtonsoft.JSON library
using System.Text;
using Newtonsoft.Json.Serialization;
namespace Asseco.JsonUtils
{
// Adapted from SnakeCaseNamingStrategy from Newtonsoft.Json library
public class KebabCaseNamingStrategy : NamingStrategy
{
const char HYPHEN = '-';
const char UNDERSCORE = '_';