Skip to content

Instantly share code, notes, and snippets.

View valberg's full-sized avatar

Víðir Valberg Guðmundsson valberg

View GitHub Profile
@valberg
valberg / gist:e2c48ae6dcee3794c33e70fd0857610a
Created December 7, 2022 09:37
tj-changed-files-error-log
2022-12-07T09:24:01.6711302Z Requested labels: ubuntu-latest
2022-12-07T09:24:01.6711345Z Job defined at: valberg/my-repo/.github/workflows/deploy.yml@refs/heads/main
2022-12-07T09:24:01.6711369Z Waiting for a runner to pick up this job...
2022-12-07T09:24:01.9263660Z Job is waiting for a hosted runner to come online.
2022-12-07T09:24:06.4422556Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
2022-12-07T09:24:09.0779121Z ##[debug]Starting: Build base
2022-12-07T09:24:09.0814861Z ##[debug]Cleaning runner temp folder: /home/runner/work/_temp
2022-12-07T09:24:09.1294237Z ##[debug]Starting: Set up job
2022-12-07T09:24:09.1294766Z Current runner version: '2.299.1'
2022-12-07T09:24:09.1327484Z ##[group]Operating System
@valberg
valberg / crud_view.py
Last active October 4, 2015 14:45
A class for quickly creating CRUD views for a django model
from django.conf.urls import include, url
from django.views.generic import (
ListView,
CreateView,
DetailView,
UpdateView,
DeleteView,
)
@valberg
valberg / keysign.py
Last active August 29, 2015 14:16
Sign keys from a keysigning party _more_ easily
import sys
import subprocess
def recv_and_sign_key(keyid, email):
print(keyid, email)
subprocess.call(['gpg2', '--recv-keys', '0x{}'.format(keyid)])
subprocess.call(['gpg2', '--fingerprint', email])

Keybase proof

I hereby claim:

  • I am valberg on github.
  • I am valberg (https://keybase.io/valberg) on keybase.
  • I have a public key whose fingerprint is 96E7 AE87 8EEB 1B89 D025 16E0 91D9 0359 9F19 83CC

To claim this, I am signing this object:

@valberg
valberg / imagewiththumbnails_updateable.py
Created April 20, 2012 14:55
Django create thumbnail form ImageField and save in a different ImageField - now with updating!
# Extension of http://www.yilmazhuseyin.com/blog/dev/create-thumbnails-imagefield-django/
# Note: image_folder and thumbnail_folder are both a callable (ie. a lambda that does a '/'.join())
class Image(Media):
image = models.ImageField(
upload_to=image_folder
)
thumbnail = models.ImageField(