4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
    Type 1 or more characters for results.
    Links per page: 20 50 100
    ◄Older
    page 15 / 217
    Newer►
    • Python logging - under the hood
      November 30, 2020 at 3:55:54 PM GMT+1 - permalink - archive.org - https://blog.urbanpiper.com/understanding-python-logging-library/
      log python
    • thumbnail
      GitHub - jazzband/django-axes: Keep track of failed login attempts in Django-powered sites.
      November 30, 2020 at 3:08:15 PM GMT+1 - permalink - archive.org - https://github.com/jazzband/django-axes
      django security
    • psql command line tutorial and cheat sheet | postgres
      November 26, 2020 at 8:11:55 AM GMT+1 - permalink - archive.org - https://tomcam.github.io/postgres/
      postgresql psql tuto
    • thumbnail
      Tailwind CSS v2.0 – Tailwind CSS

      À tester pour changer de bootstrap!

      November 26, 2020 at 8:09:08 AM GMT+1 - permalink - archive.org - https://blog.tailwindcss.com/tailwindcss-v2
      css framework
    • thumbnail
      Smallstep SSH — Single Sign-On SSH With Zero Key Management
      November 26, 2020 at 8:06:38 AM GMT+1 - permalink - archive.org - https://smallstep.com/sso-ssh/?utm_campaign=Cronweekly
      ssh
    • Dev Fonts
      November 26, 2020 at 8:05:50 AM GMT+1 - permalink - archive.org - https://devfonts.gafi.dev/
      compare dev font
    • Rate limiting using Python and Redis
      November 14, 2020 at 3:08:34 PM GMT+1 - permalink - archive.org - https://www.hackdoor.io/articles/rate-limiting-using-python-and-redis-9b7dbce8c7a5
      python rate ratelimiter
    • thumbnail
      73 Examples to Help You Master Python's f-strings
      November 14, 2020 at 3:03:10 PM GMT+1 - permalink - archive.org - https://miguendes.me/73-examples-to-help-you-master-pythons-f-strings
      python string
    • Disk Usage - PostgreSQL wiki
      WITH RECURSIVE pg_inherit(inhrelid, inhparent) AS
          (select inhrelid, inhparent
          FROM pg_inherits
          UNION
          SELECT child.inhrelid, parent.inhparent
          FROM pg_inherit child, pg_inherits parent
          WHERE child.inhparent = parent.inhrelid),
      pg_inherit_short AS (SELECT * FROM pg_inherit WHERE inhparent NOT IN (SELECT inhrelid FROM pg_inherit))
      SELECT table_schema
          , TABLE_NAME
          , row_estimate
          , pg_size_pretty(total_bytes) AS total
          , pg_size_pretty(index_bytes) AS INDEX
          , pg_size_pretty(toast_bytes) AS toast
          , pg_size_pretty(table_bytes) AS TABLE
        FROM (
          SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes
          FROM (
               SELECT c.oid
                    , nspname AS table_schema
                    , relname AS TABLE_NAME
                    , SUM(c.reltuples) OVER (partition BY parent) AS row_estimate
                    , SUM(pg_total_relation_size(c.oid)) OVER (partition BY parent) AS total_bytes
                    , SUM(pg_indexes_size(c.oid)) OVER (partition BY parent) AS index_bytes
                    , SUM(pg_total_relation_size(reltoastrelid)) OVER (partition BY parent) AS toast_bytes
                    , parent
                FROM (
                      SELECT pg_class.oid
                          , reltuples
                          , relname
                          , relnamespace
                          , pg_class.reltoastrelid
                          , COALESCE(inhparent, pg_class.oid) parent
                      FROM pg_class
                          LEFT JOIN pg_inherit_short ON inhrelid = oid
                      WHERE relkind IN ('r', 'p')
                   ) c
                   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
        ) a
        WHERE oid = parent
      ) a
      ORDER BY total_bytes DESC;
      November 13, 2020 at 12:00:07 PM GMT+1 - permalink - archive.org - https://wiki.postgresql.org/wiki/Disk_Usage
      postgresql size
    • Postgres Observability
      November 12, 2020 at 11:41:32 AM GMT+1 - permalink - archive.org - https://pgstats.dev/
      postgresql
    • Time zones | Django documentation | Django
      November 6, 2020 at 5:55:45 PM GMT+1 - permalink - archive.org - https://docs.djangoproject.com/en/3.1/topics/i18n/timezones/
      django python timezone
    • Creating a new file or directory in Vim using NERDTree - Kevin Sookocheff
      November 6, 2020 at 10:50:07 AM GMT+1 - permalink - archive.org - https://sookocheff.com/post/vim/creating-a-new-file-or-directoryin-vim-using-nerdtree/
      vim
    • restic · Backups done right!

      via Doo

      October 29, 2020 at 5:30:15 PM GMT+1 - permalink - archive.org - https://restic.net/
      backup tools
    • thumbnail
      python - Displaying a timedelta object in a django template - Stack Overflow

      Here's my filter code

      from django import template

      register = template.Library()

      @register.filter()
      def smooth_timedelta(timedeltaobj):
      """Convert a datetime.timedelta object into Days, Hours, Minutes, Seconds."""
      secs = timedeltaobj.total_seconds()
      timetot = ""
      if secs > 86400: # 60sec 60min 24hrs
      days = secs // 86400
      timetot += "{} days".format(int(days))
      secs = secs - days*86400

      if secs > 3600:
          hrs = secs // 3600
          timetot += " {} hours".format(int(hrs))
          secs = secs - hrs*3600
      
      if secs > 60:
          mins = secs // 60
          timetot += " {} minutes".format(int(mins))
          secs = secs - mins*60
      
      if secs > 0:
          timetot += " {} seconds".format(int(secs))
      return timetot

      Then in my template I did

      {% load smooth_timedelta %}

      {% timedeltaobject|smooth_timedelta %}

      October 29, 2020 at 10:25:50 AM GMT+1 - permalink - archive.org - https://stackoverflow.com/questions/16348003/displaying-a-timedelta-object-in-a-django-template
      django filter python
    • thumbnail
      A Guide to Locally Testing Containers with Amazon ECS Local Endpoints and Docker Compose | AWS Compute Blog

      Un container pour émuler en local l'api metadata et ainsi endosser un role
      https://github.com/awslabs/amazon-ecs-local-container-endpoints

      October 16, 2020 at 5:48:54 PM GMT+2 - permalink - archive.org - https://aws.amazon.com/blogs/compute/a-guide-to-locally-testing-containers-with-amazon-ecs-local-endpoints-and-docker-compose/
      aws dev local metadata
    • Amazon ECS events - Amazon Elastic Container Service
      October 16, 2020 at 11:37:58 AM GMT+2 - permalink - archive.org - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwe_events.html
      cloudwatch ecs event
    • Note: python natural sort

      def atoi(text):
      return int(text) if text.isdigit() else text

      def natural_keys(text):
      return [ atoi(c) for c in re.split(r'(\d+)', text) ]

      my_list.sort(key=natural_keys)

      October 9, 2020 at 3:01:43 PM GMT+2 - permalink - archive.org - https://links.infomee.fr/?6OC8rw
      python sort
    • SchemaSpy • Database Documentation Built Easy.

      Un outils pour visualiser son schema

      via Flavio

      October 7, 2020 at 4:54:19 PM GMT+2 - permalink - archive.org - http://schemaspy.org/
      postgresql schema visu
    • thumbnail
      GitHub - darold/pgFormatter: A PostgreSQL SQL syntax beautifier that can work as a console program or as a CGI. On-line demo site at http://sqlformat.darold.net/
      October 7, 2020 at 2:38:34 PM GMT+2 - permalink - archive.org - https://github.com/darold/pgFormatter
      format lint linter postgresql
    • Everything You Need to Know About Python's Namedtuples
      October 4, 2020 at 5:03:53 PM GMT+2 - permalink - archive.org - https://miguendes.me/everything-you-need-to-know-about-pythons-namedtuples-ckfim70u102jbots197jn0zmh#why-should-i-use-namedtuples
      data namedtuple python type
    Links per page: 20 50 100
    ◄Older
    page 15 / 217
    Newer►
    Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation