Skip to content

Instantly share code, notes, and snippets.

@veekaybee
veekaybee / normcore-llm.md
Last active June 29, 2024 03:29
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@benyanke
benyanke / mikrotik-dhcp-dns-script
Created June 16, 2019 02:42
Mikrotik DHCP-to-DNS Script
# NOT fully complete with all the desired features but it does work
# Suggested usage - place in the system scheduler and run every few minutes
# Set root domain here
:local zone "your.internal.domain.com";
:local ttl "00:00:10"
:local staticTtl "00:00:30"
# TODO : add "nodns" check in static lease comment
#template for select option, I use it to show regions and draw country flags for each city
cityOptionTpl = (obj)->
_.tpl('CitySelectOption')(obj)
#helper for rendering option
renderCityOption = (entry)->
tplRes = cityOptionTpl({it:
title : entry.title
region : entry.region
country_name : entry.country_name
$.fn.select2.amd.define('select2/data/extended-ajax',['./ajax','../utils','jquery'], function(AjaxAdapter, Utils, $){
function ExtendedAjaxAdapter ($element,options) {
//we need explicitly process minimumInputLength value
//to decide should we use AjaxAdapter or return defaultResults,
//so it is impossible to use MinimumLength decorator here
this.minimumInputLength = options.get('minimumInputLength');
this.defaultResults = options.get('defaultResults');
ExtendedAjaxAdapter.__super__.constructor.call(this,$element,options);
@SmartFinn
SmartFinn / dhcp-leases-to-dns.rsc
Last active June 14, 2024 22:44
MikroTik (RouterOS) script for automatically setting DNS records for clients when they obtain a DHCP lease
# MikroTik (RouterOS) script for automatically setting DNS records
# for clients when they obtain a DHCP lease.
#
# author SmartFinn <https://gist.github.com/SmartFinn>
:local dnsTTL "00:15:00";
:local token "$leaseServerName-$leaseActMAC";
# Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone")
# - truncate length to 63 chars
@chadrien
chadrien / README.md
Last active September 1, 2023 12:43
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@NickCraver
NickCraver / Windows10-Setup.ps1
Last active April 1, 2024 10:52
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@janeczku
janeczku / cloud-config.yaml
Last active June 7, 2018 13:57
RancherOS iPXE boot script and cloud-config. Ramdisk based deployment with persistent storage on disk. Configures private IP on eth1 from EC2 metadata.
#cloud-config
hostname: rancher-os
ssh_authorized_keys:
- ssh-rsa REPLACE_WITH_PUBLIC_SSH_KEY
rancher:
debug: false
cloud_init:
datasources:
- ec2
state:
@dealproc
dealproc / Deploy.ps1
Created March 2, 2015 08:19
Using Fluent Migrator with Octopus Deploy
if (!$MainDB) {
$MainDB = '...';
}
tools\migrate.exe --task migrate --connection "$MainDB" --provider "SqlServer2012" --assembly "lib\net45\Adapt.Gift.DatabaseScripts.dll" --tps
@asiegman
asiegman / nginx.conf
Created January 29, 2015 16:29
nginx logstash output
# Output json-esque output for logstash to parse easily.
http {
# ...
log_format logstash_json '{"@timestamp": "$time_iso8601", '
'"remote_addr": "$remote_addr", '
'"remote_user": "$remote_user", '
'"body_bytes_sent": "$body_bytes_sent", '
'"request_time": "$request_time", '