Blinky on Arduino UNO with Zig
Thu, Jan 5, 2023 | CommentsLet’s give Zig a try on Arduino UNO with microzig
Let’s give Zig a try on Arduino UNO with microzig
Unfortunately, dependabot does not support Clojure. And as such, I came up with a silly idea of putting something similar together using Github Actions.
Here is a foraging cat toy based on design I saw in a youtube video by EvanAndKatelyn.
This is a short HOWTO based on great idea from this blog post on how
to utilize gorun and binfmt_misc
to use go files for scripting.
Couple of days ago Google cloud functions got official support for go 1.11.
I got interested in how to handle routing in cloud functions in go, so after couple of experiments I came up with a solution based on http.ServeMux
.
This blog post is just a bunch of shell snippets quickly put together that explain how to use YubiKey as your ssh key.
Collection of tweaks that I gathered after installing Arch Linux on to Lenovo IdeaPAD Y700.
Couple of tips from my experience of running Arch on Macbook 8.2.
This is a small post on how to improve your ClojureScript development flow in NeoVim using its terminal feature.
Great thing about React is that you can write what people nowadays call “isomorphic JavaScript”. In this post we will not discuss how wrong this term is in many ways, but instead we will focus on how to achieve similar results in your ClojureScript code using Reagent library.
Some time ago I actually did run ln -sf /usr/bin/emacs /usr/bin/vim
.
And left it like that for a couple of days.
I must say that it was surprisingly nice experience.
Tinkering around with elisp, building editing environment from scratch.
Of course interesting question is “How did I end up with this idea in my head?”.
Grenchman is a small tool that runs leiningen tasks over nrepl.
Helps with JVM startup time during development. Build in OCaml. If you are not in to the building binary on your own, there are pre-build binaries on the official website.
And here is one missing binary for OpenSUSE (tested on 13.1, fedora binary does not work).
grench-opensuse [sha1 | sig]
Small code snippet showing ability to generate 2 way data bindings in Reagent. Underneath it’s all about core.async. Also provides ability to apply transformation using transducers.
We all hate shell scripting. Scripts are annoyingly hard to debug, test and verify. Would be lovely, to use some kind of lisp for scripting, right? To do interactive development with repl in your favorite editor. To write it in a nice predictable language that you also enjoy. But sometimes it’s impossible to add some external dependencies to the system. What if you have only JVM to your disposal, will you be able to pull it off only with JVM and clojure.jar?
Small announcement post.
Today I launched tiny scotty server that serves json for Hacker News front page. Project source code is located on github. You can access api here.
Hacker news parser is implemented using HXT and HandsomeSoup. Json is served with help of Scotty web framework. Currently it’s running on Heroku using this ghc-7.8 buildpack.
I don’t use RSS since I’m also interested in points and amount of comments. For me HN is more about interesting links than community and conversations behind the posts. So I don’t really care about anything except front page.
Originally I started this project as a Haskell learning exercise. I hope someone will find it useful.
Very small post (more like insruction for myself for the future) on how to convert deb packages provided by Spotify to rpm. Solution can be applied to any rpm based system (I think so).
Here is small post with instructions how to setup auto connect to VPN. Of course you can probably figure out all this yourself, but what if you are lazy?
Today I got a little bit bored and spend few hours poking around with java.awt in Clojure. Result is tray app that shows stories from HN front page. Just in ~50 lines of Clojure code. Enjoy!
Source code is below:
Since I switched to Programmed Dvorak layout default keybindings for different operations started to annoy me sometimes. I was thinking about hardware cut/copy/paste in apps even before that. But only with Dvorak I realized how useful it can be. I always wondered why there is no hardware support for that on various keyboard that are out there. And then I saw keyboard.io. Project is about hackable ergonomic mechanical keyboards build on top of Teensy/Arduino Micro boards. And I decided to play a little bit with that idea. Lets start with implementing hardware cut/copy/paste using Leonardo and then lets see how far we can push the idea.
I found out about ruby gem called visualruby and decided to give it a try. Unfortunately it has a lot of dependencies that were missing on my system. So to save my (or maybe your’s if you are reading this now) time in the future here are required dependencies for OpenSUSE 13.1. I bet you can figure out similar packages for different distribution.
Digging deeper in to the call/cc land I found interesting puzzle called yin-yang.
Here is Scheme implementation:
(let* ((yin
((lambda (cc) (display #\@) cc) (call-with-current-continuation (lambda (c) c))))
(yang
((lambda (cc) (display #\*) cc) (call-with-current-continuation (lambda (c) c)))))
(yin yang))
It will print @*@**@***@****@*****@******@...
forever.
So OpenSUSE 13.1 was released. And it’s great. But… Since gnome 3.9 support for custom window managers was broken. How to restore sanity to your desktop? Mate it! Here is quick how to.
Today I started improving my feeds2imap.clj project with core.typed. And already hit few issues, so this post is something like collection of tips how to solve issues with core.typed based on my experience. I couldn’t find answers on my issues in wiki or documentation. But I got answers annoying Ambrose Bonnaire-Sergeant on Google+. Thank you for your patience, man! And keep doing what you are doing, core.typed is just amazing thing!
I love idea of standing desks. I feel myself much more productive behind standing desk. But commercial desks suffer from high price and complicated design.
Solution? Build your own standing desk!
I’m often complaining about my ISP quality. Sometimes pings are high, sometimes download speed goes down. So I decided to make sure it’s my ISP fault and not just my opinion based on my hate to them.
How to do so? Let’s collect data about download speed and pings over time, and show some graphs based on that data.
Google Reader was shut down and I started looking for alternatives. And sadly I did not found anything close to Google Reader experience. There are plenty good alternatives, but all of them suffer from some kind of background noise (social based features, weird hotkeys, weird ui, unusable mobile clients and etc.). All I wanted was simple to use news reader.
So I spend few hours playing with Linux Containers. Pretty interesting stuff. So here is small tutorial on how to create and use container on Arch Linux as host machine.
Here you can download latest Java 8 preview for armhf. Lets benchmark it on Raspberry Pi!
Bored and have free time? Lets build something. Lets build RC Toy. Hm, and lets use Clojure (because clojure is pure fun to use).
Ctags is great piece of software. And it took me some time to realize how I can use ctags with vim in optimal for me way. My solution is petty simle. I have few vim functions that vim runs when buffer write is done.
I spend today few hours reading mc documentation about color scheme configuration. Came up with following color scheme. Enjoy :)
.config/mc/ini
:
[Colors]
base_color=lightgray,blue:normal=blue,default:reverse=green,default:gauge=gray,lightgray:selected=white,blue:marked=yellow,default:markselect=yellow,default:directory=brightblue,default:executable=brightgreen,default:link=cyan,default:device=brightmagenta,default:core=red,default:special=lightgray,default:dnormal=lightgray,blue:dfocus=lightgray,black:dhotnormal=yellow,blue:dhotfocus=yellow,black:menunormal=lightgray,blue:menuhot=yellow,blue:menusel=lightgray,black:menuhotsel=yellow,black:menuinactive=lightgray,gray:errors=lightgray,red:errdhotnormal=yellow,red:errdhotfocus=yellow,lightgray:input=lightblue,gray:inputunchanged=blue,gray:inputmark=white,blue:bbarhotkey=white,black:bbarbutton=lightgray,blue:viewbold=lightgray,default:viewunderline=lightblue,default:viewselected=lightgray,grey:helpnormal=lightgray,default:helpitalic=lightblue,default:helpbold=lightgray,default:helplink=green,default:helpslink=lighgreen,defalt:
For more information take look at mc wiki and run mc --help-color
to see available color variables in your mc version.
Format of color configuration is what=foreground,background:
. All configuration shoud be in one line (ofcourse you can write it in multiple lines and then use vim (or other cool editor) magic).
Benchmark is based on my previous experiments with BeagleBone and Clojure. Setup is the same. BeagleBone is running Ubuntu 12.04. Cpu is running on 500 Mhz. Node version is 0.6.12. ClojureScript is compiled with advanced and simple optimizations.
So I heard that you hate IE. Also I heard that you love HTML5. Is that true? Great, I feel the same about IE. So here is quick fallback script for html5 validation in older browsers. You will need three things for that.
Recently I migarted from awesome to xmonad. I’m Programmer Dvorak freak, so I stuck with controlling current workspace from numbers row.
After installing Embedded JRE on BeagleBone I decided to benchmark it against OpenJDK.
Recently I was playing with Clojure on Beaglebone and decided to give a try to Oracle’s new Embedded JRE. But after downloading JRE from Oracle website (with filling useless stupid forms) I received following error:
java: no such file or directory
So here is fix:
sudo apt-get install -y libc6-armel libsfgcc1
Great news everyone! Today Arch Linux officially switched to GRUB2!
I just figured out that my disqus account was attached to gonzih.github.com but my blog was actually hosted using blog.gonzih.org domain. That is why comments count was equal to 0 for every post on my index page. To fix that go to admin ui in disqus and use domain migration tool.
The Internet Blackout was just the beginning. Together, our websites and personal networks can mobilize the planet to defend the internet from bad laws & monopolies. Are you in?
Join Internet Defence League at internetdefenseleague.org
Here simple script that will add magnet link as torrent file to your watch directory. You can use it from command line or set it in your browser to handle magnet links.
#!/bin/bash
cd ~/watch # set your watch directory here
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"
You must change encoding for template1. For do that run following.
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
#recomended
\c template1
VACUUM FREEZE;
If your get following pygments error using octopress with arch linux.
Building site: source -> public
File "<string>", line 1
import sys; print sys.executable
^
SyntaxError: invalid syntax
It’s happens because RubyPython use Python version 2 by calling “python” command. By default python equal to python3 in Arch Linux.
For fix simple add ruby file to plugins directory with following code.
If you have throuble with tmux and rvm default simple add following to end of your .zshrc file.
[[ $TERM = "screen" ]] && rvm use default