Skip to content

Instantly share code, notes, and snippets.

View grilix's full-sized avatar
👨‍🏭
Sí?

Gonzalo grilix

👨‍🏭
Sí?
  • Tarmac
  • Montevideo, Uruguay
View GitHub Profile
@grilix
grilix / Readme.md
Last active October 11, 2024 05:04
RISC-V Odd numbers list

This is an example for finding the odd numbers using RISC-V assembly.

It will start from a0 up to a1, storing each odd number into the memory address in a4 onwards.

Requires ((a1 - a0) / 2) * 4 bytes of memory or something, should be fine for reasonable values.

Tested on Ripes.

@grilix
grilix / 00-dns.conf
Last active March 1, 2017 00:52
Docker DNS/DHCP server
# dnsmasq/00-dns.conf
no-resolv
stop-dns-rebind
rebind-localhost-ok
local=/z.skylands/
domain=z.skylands
strict-order
server=8.8.4.4
server=8.8.8.8
(= (
(fn [items n]
(loop [nitems items
i 0]
(if (= i n)
(first nitems)
(recur
(rest nitems)
(inc i)))))
'(4 5 6 7)
class Fixnum
def minutes
if self == 1
raise ArgumentError, "Use minute instead."
end
self * 60
end
def minute
if self != 1