Skip to content

Instantly share code, notes, and snippets.

View ljmocic's full-sized avatar

Ljubiša Moćić ljmocic

View GitHub Profile
@ljmocic
ljmocic / current.json
Last active September 1, 2026 12:55
rvns-scraper: public JGSP Novi Sad schedule data (auto-published, read by the Android app)
{
"vaziod": "2026-09-01",
"scrapedAt": "2026-09-01T12:55:11.491Z",
"contentHash": "678e76e0a9974d51568938c10324c0cfb4acc5ed6e9310a86b65a23f5b7e167e",
"latest": "meta.json"
}
@ljmocic
ljmocic / docker-compose.yml
Last active November 10, 2025 13:24
midgard-setup
version: '3'
services:
midgard:
build:
context: .
dockerfile: Dockerfile
image: midgard
restart: always
ports:
import json
import boto3
BUCKET = 'your-bucket-name'
KEY = 'your-file-key'
s3 = boto3.resource('s3')
file_object = s3.Object(BUCKET, KEY)
json_content = json.loads(file_object.get()['Body'].read())
# Read more about it
# https://ljmocic.medium.com/publish-simple-node-js-aws-lambda-layer-a87c00afdd83
mkdir nodejs
cd nodejs
npm i axios
rm -rf package-lock.json
cd ..
zip -r axios.zip nodejs
import datetime
import csv
import boto3
from boto3.session import Session
MAX_DAYS_OLD = 15
# Checks if access key is older than predefined number of days
import boto3
import email
import json
from pprint import pprint
from base64 import b64decode
s3 = boto3.client('s3')
BUCKET_NAME = ''
def lambda_handler(event, context):
#!/bin/bash
# Run using: chmod a+x mac-setup.sh && ./mac-setup.sh
# Read more about it
# https://medium.com/@ljmocic/quickly-setup-development-environment-on-mac-91bbbd647011
# Request admin permissions
sudo -v
# Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Read more about setting it up
# https://medium.com/@ljmocic/make-telegram-bot-for-notifying-about-new-rss-feed-items-4cfbcc37f4fd
from datetime import timedelta, datetime
from dateutil import parser
from pprint import pprint
from time import sleep
import requests
import feedparser
# Read more about setting it up
# https://medium.com/@ljmocic/deploying-react-application-to-aws-s3-using-github-actions-85addacaeace
on:
push:
tags:
- '*'
jobs:
build:
import os
import json
import boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table(os.environ['DYNAMODB_TABLE'])
def detect_event(event):