Skip to content

Instantly share code, notes, and snippets.

View pkulev's full-sized avatar

Pavel Kulyov pkulev

View GitHub Profile
@staltz
staltz / introrx.md
Last active April 19, 2024 18:49
The introduction to Reactive Programming you've been missing
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active March 29, 2024 19:56
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@abrochard
abrochard / presentation.org
Last active March 3, 2024 12:05
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions
@ForNeVeR
ForNeVeR / main.cpp
Created February 14, 2014 14:32
"ЩИ!!!Симулятор жестокости" - http://www.gamedev.ru/projects/forum/?id=160897
#define WIN32_LEAN_AND_MEAN // just say no to MFC
#define INIT_GUID
#include "hge.h"
#include <hgesprite.h>
#include <hgefont.h>
#include <hgecolor.h>
@bradwright
bradwright / path.el
Created March 15, 2012 20:13
Set Emacs exec-path by shell $PATH
;; This sets the Emacs "PATH" environment variable and the `exec-path`
;; variable to the same value your login shell sees. The reason this
;; is necessary is because of this:
;;
;; http://developer.apple.com/library/mac/#qa/qa1067/_index.html
;;
;; Basically apps launched from Finder inherit their environment from
;; a .plist file rather than the shell environment.
(defun set-exec-path-from-shell-PATH ()
@Wilfred
Wilfred / regex.org
Last active January 7, 2020 17:22
Native Rust Regular Expressions in Remacs

RFC: Use Rust’s regex crate

We want to port Remacs to use a regex crate implemented in Rust. The Rust implementations are highly optimised, and this would simplify the Remacs codebase.

The two major crates are Rust’s regex crate, and the fancy-regex crate.

@alex-eg
alex-eg / platform-var.el
Created May 7, 2018 22:13
elisp platform-set-variable
(defvar *var-plist* (list))
(defmacro platform-var (name &rest plist)
(let ((plist-keys (mapcar 'car (seq-partition plist 2)))
(platforms '(:gnu :gnu/linux :gnu/kfreebsd :darwin :ms-dos :windows-nt :cygwin)))
(mapcar (lambda (key)
(when (not (member key platforms))
(error "Platform `%s' doesn't exist. Possible values: `%s'" key platforms)))
plist-keys)
(setq *var-plist* (plist-put *var-plist* name plist))
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <version> <revision>"
echo "for example for Java 1.8.0.92 it would be:"
echo "$0 8 92"
exit 1
fi
VERSION="$1u$2"
@SpotlightKid
SpotlightKid / ecs_example.py
Last active November 19, 2015 10:41
Example of plumbing needed to use the ecs package
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
from ecs import Component, Entity, EntityManager, System, SystemManager
class MovementSystem(System):
"""Movement system to update position of Movable components."""
@sanchitgangwar
sanchitgangwar / robot_simple.py
Created March 29, 2012 06:54
Bomb Defusing Tobot
#! /usr/bin/python
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
import random
from random import randrange, randint
def printRobot(win, pos_x, pos_y, size):
''' Prints the Robot '''
for i in range(size):