Skip to content

Instantly share code, notes, and snippets.

@sartak
sartak / socratic_fp_learning.md
Last active June 16, 2025 15:39 — forked from Dowwie/socratic_fp_learning.md
Following is a prompt for effective learning with an LLM. It uses the Socratic method to help the student build up their understanding from first principles. Replace the topic in the prompt and then in your follow-up prompt , specify the subject.

You are a teacher of computer science who specializes in the use of the socratic method of teaching concepts. You build up a foundation of understanding with your student as they advance using first principles thinking. Explain the subject that the student provides to you using this approach. By default, do not explain using source code nor artifacts until the student asks for you to do so. Furthermore, do not use analysis tools. Instead, explain concepts in natural language. You are to assume the role of teacher where the teacher asks a leading question to the student. The student thinks and responds. Engage misunderstanding until the student has sufficiently demonstrated that they've corrected their thinking. Continue until the core material of a subject is completely covered. I would benefit most from an explanation style in which you frequently pause to confirm, via asking me test questions, that I've understood your explanations so far. Particularly helpful are test questions related to simple, explicit

@sartak
sartak / keymap.c
Last active December 26, 2022 18:44
Repeat Key
#include QMK_KEYBOARD_H
enum custom_keycodes {
REP = SAFE_RANGE
};
// use REP in the layout
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = ...
uint16_t key = 0;
@sartak
sartak / vagrant-clean.sh
Last active August 1, 2019 17:56 — forked from jdowning/vagrant-clean.sh
Script to clean up Ubuntu Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/sartak/4af06edcb3/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@sartak
sartak / 1-anki_mobile_card.html
Last active February 18, 2023 17:15 — forked from redoPop/anki_mobile_card.html
HTML used by AnkiMobile 2.0.88 to render card templates; a reference for creating advanced Anki card templates with special HTML/CSS
<html>
<head>
<meta
name="viewport"
id="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=10,user-scalable=1"
/>
<link type="text/css" rel="stylesheet" href="res/web/css/reviewer.css" />
<script src="res/web/js/vendor/jquery.min.js"></script>
<script src="res/web/js/vendor/css_browser_selector.min.js"></script>
normalizeIsoDate: function(date) {
if (date == "today") {
return new Date();
}
var split = date.split('-');
return new Date(split[0], split[1], split[2]);
},
@sartak
sartak / gist:2406822
Created April 17, 2012 15:30 — forked from hatched/gist:2406817
PopupCalendarGroup syntax
var jobCalendars = new Y.PopupCalendarGroup({
container: Y.one('.job-form'),
start: '.form_job_date_start',
end: '.form_job_end_date'
});
var positionCalendars = new Y.PopupCalendarGroup({
container: Y.one('.position-form'),
start: '.form_job_date_start',
end: '.form_job_end_date'

Moose Hackathon Agenda

  • Traits in C::MOP
  • removing T::E from Moose/MOP
    • adding lives_ok/dies_ok to Test::Moose
  • merging C::MOP and Moose
  • Antlers
  • merging MooseX modules into Moose and/or core
    • MX::AH into core
  • MooseX::Traits -> Moose::Traits
package Module::Install::Repository;
use strict;
use 5.008_001;
our $VERSION = '0.01';
use base qw(Module::Install::Base);
sub auto_set_repository {
my $self = shift;