Skip to content

Instantly share code, notes, and snippets.

View unya's full-sized avatar

Paweł Lasek unya

View GitHub Profile
@wiseman
wiseman / blaze BUILD google
Created October 4, 2012 16:56
blaze BUILD google
# -*- mode: python; -*-
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@spacebat
spacebat / critter.lisp
Created April 27, 2016 04:31
CLOS append method combination example
;; An example of append method combination to form a projection of an object's slots
(defclass odour-mixin ()
((odour :initarg :odour :initform nil :reader odour)))
(defclass colour-mixin ()
((colour :initarg :colour :initform nil :reader colour)))
(defclass sound-mixin ()
((sound :initarg :sound :initform nil :reader sound)))
@spacebat
spacebat / icicle.lisp
Created April 27, 2016 14:28
Freeze special variable bindings with funcallable instances
;;; Just mucking about with funcallable instances. This class defines
;;; an instance that "freezes" a specified set of special variable
;;; bindings at the time of instantiation, so when the instance is
;;; called these bindings are preserved. This could be achieved with a
;;; closure, but then you couldn't read and alter the bindings so
;;; easily.
(ql:quickload :closer-mop)
(defclass icicle ()

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@benjaminoakes
benjaminoakes / errors.txt
Created July 28, 2017 16:31
BeOS (NetPositive) haiku error messages
Not a pretty sight
When the web dies screaming loud
The site is not found.
Morning and sorrow
404 not with us now
Lost to paradise.