Did you know that it is rather easy to setup a VM to test your NixOs configuration?
# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
If programming is more than just a means of getting things done for you, then Common Lisp is for you!
Table of Contents
# https://github.com/containers/buildah/blob/master/install.md | |
- name: Add buildah repository key | |
apt_key: | |
url: https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key | |
state: present | |
- name: Enable buildah repository | |
apt_repository: | |
repo: deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ / |
// | |
// --------- Model --------- | |
// | |
type Details = | |
{ Name: string | |
Description: string } | |
type Item = | |
{ Details: Details } |
#!/bin/bash | |
pip install "$1" 2>/dev/null | |
easy_install "$1" 2>/dev/null | |
brew install "$1" 2>/dev/null | |
npm install "$1" 2>/dev/null | |
yum install "$1" 2>/dev/null | |
dnf install "$1" 2>/dev/null | |
docker run "$1" 2>/dev/null | |
pkg install "$1" 2>/dev/null |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
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.
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
# a simple Python plugin loading system | |
# see http://stackoverflow.com/questions/14510286/plugin-architecture-plugin-manager-vs-inspecting-from-plugins-import | |
class PluginMount(type): | |
""" | |
A plugin mount point derived from: | |
http://martyalchin.com/2008/jan/10/simple-plugin-framework/ | |
Acts as a metaclass which creates anything inheriting from Plugin | |
""" |