Skip to content

Instantly share code, notes, and snippets.

VARAD

Deebet

  • 1010 - Sularaha kassas
  • 1020 - Arvelduskontod
  • 1030 - Tähtajalised hoiused
  • 1040 - Paigutused ülilikviidsetesse fondidesse
  • 1050 - Raha teel
  • 1100 - Lühiajalised finantsinvesteeringud
  • 1210 - Ostjatelt laekumata arved
@argoroots
argoroots / aggregate.js
Last active September 28, 2023 10:05
Aggregate MongoDb property to entity
db.property.aggregate([
{
$match: {
deleted: {
$exists: false,
},
},
},
{
$group: {
@argoroots
argoroots / restore.sh
Created May 24, 2022 13:03
Restore all files from AWS Glacier Deep Archive
aws s3api list-objects-v2 --bucket $1 --output text --query "Contents[?StorageClass== 'DEEP_ARCHIVE']" | awk '{ $1=""; print $0 }' | awk 'NF{NF-=3};1' > restore.txt
while read i; do
echo "$i"
aws s3api restore-object --bucket $1 --key "$i" --restore-request Days=21
done <restore.txt
#!/usr/bin/env pybricks-micropython
from pybricks import ev3brick as brick
from pybricks.ev3devices import Motor, UltrasonicSensor
from pybricks.parameters import Port
from pybricks.tools import wait
from pybricks.robotics import DriveBase
# Play a sound.
brick.sound.beep()
@argoroots
argoroots / add_rights.sql
Last active November 13, 2017 11:50
Entu - Rights
--
-- Give recursive rights to person on entity
--
SELECT id INTO @mihkel FROM entity WHERE old_id = 'mihkel';
SET @person_id = 415167;
SET @root_entity_id = 4173;
SET @right = 'editor';
SET @edk = 'folder';
INSERT INTO relationship (relationship_definition_keyname, entity_id, related_entity_id, created, created_by)
@argoroots
argoroots / MobileIDauth.py
Last active December 13, 2015 21:39
Python (and tornadoweb) sample code for Estonian MobileID authentication. More info and spec are available on SK website http://www.sk.ee/teenused/kehtivuskinnituse-teenus/digidoc-veebiteenus
from tornado import web
from suds.client import Client
import random
import string
import time
class MobileIDtest(web.RequestHandler):
def get(self):