I hereby claim:
- I am senko on github.
- I am senko_boost (https://keybase.io/senko_boost) on keybase.
- I have a public key ASAeEgK4it3B4MVJTgPeAhTTI2qYmvtWVXne7x3ZHmHNJgo
To claim this, I am signing this object:
#!/bin/bash | |
# | |
# Written by Senko Rasic <senko@senko.net> and released unto Public Domain. | |
# | |
# Save this to ~/.local/bin/clean-transient-folders. Then add it to | |
# your user crontab with a rule like this: | |
# | |
# # Run this every day at 5am | |
# 0 5 * * * /home/<user>/.local/bin/clean-transient-folders | |
# |
# Written by Senko Rasic <senko.rasic@goodcode.io> | |
# Released into Public Domain. Use it as you like. | |
from django.db import models | |
class SingletonModel(models.Model): | |
"""Singleton Django Model | |
Ensures there's always only one entry in the database, and can fix the |
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
#!/bin/bash | |
# | |
# Cycle through all workspaces and set them to tabbed if "small" and | |
# split horizontally if "big". "Small" is defined as having width less | |
# than 2880, otherwise it's big. | |
# | |
# Looks a bit messy for a split second, but then returns to the current | |
# workspace. | |
workspaces_json="$(swaymsg -t get_workspaces)" |
#!/bin/bash | |
if test -z "$1"; then | |
echo "Usage: $0 <prompt>" | |
exit 1 | |
fi | |
if test -z "$OPENAI_API_KEY"; then | |
echo "OpenAI key is missing - \$OPENAI_API_KEY must be set" | |
exit 1 |
#!/bin/bash | |
if test -z "$2"; then | |
echo "Usage: $0 <app_id> <command ...>" | |
exit 1 | |
fi | |
app_id="$1" | |
shift |
#!/usr/bin/env python | |
# | |
# Calculate top list of programming languages based on HN stories/comments/points | |
# More info: https://blog.senko.net/relative-popularity-of-programming-languages-on-hacker-news | |
from datetime import datetime, timedelta | |
from json import dump, load | |
from os.path import join, exists | |
from tempfile import gettempdir | |
from typing import Optional |
I hereby claim:
To claim this, I am signing this object:
# maybe.py - a Pythonic implementation of the Maybe monad | |
# Copyright (C) 2014. Senko Rasic <senko.rasic@goodcode.io> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
To anyone who asks why we're rewriting AWW backend in anything other than nodejs, here's an example. This is an output log from an automated server provisioning script that in theory should automatically install AWW. In practice, I have to fudge it every few months because the node packages keep breaking. This is even though we've pinned all our dependencies to an exact version. | |
Damn them all to hell. | |
^ | |
/home/aww/.node-gyp/0.12.15/include/node/node.h:273:1: note: in expansion of macro ‘NODE_DEPRECATED’ | |
NODE_DEPRECATED("Use FatalException(isolate, ...)", | |
^ | |
/home/aww/.node-gyp/0.12.15/include/node/node.h: In function ‘v8::Local<v8::Value> node::Encode(const void*, size_t, node::encoding)’: | |
/home/aww/.node-gyp/0.12.15/include/node/node.h:287:62: warning: ‘v8::Local<v8::Value> node::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /home/aww/.node-gyp/0.12.15/include/node/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations] |