Skip to content

Instantly share code, notes, and snippets.

View Trafitto's full-sized avatar
💢

Marco Borchi Trafitto

💢
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@Trafitto
Trafitto / time_limited_paginator.py
Created October 12, 2023 13:43 — forked from hakib/time_limited_paginator.py
CountTimeoutLimitPaginator - Paginator that enforced a timeout on the count operation.
class TimeLimitedPaginator(Paginator):
"""
Paginator that enforced a timeout on the count operation.
When the timeout is reached a "fake" large value is returned instead,
Why does this hack exist? On every admin list view, Django issues a
COUNT on the full queryset. There is no simple workaround. On big tables,
this COUNT is extremely slow and makes things unbearable. This solution
is what we came up with.
"""
@Trafitto
Trafitto / README-Template.md
Created December 5, 2017 14:45 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Trafitto
Trafitto / Mover.cs
Created May 9, 2017 19:51 — forked from Abban/Mover.cs
Simple 2D Waypoint Movement in Unity
using UnityEngine;
using System.Collections;
public class Mover : MonoBehaviour
{
public Waypoint[] wayPoints;
public float speed = 3f;
public bool isCircular;
// Always true at the beginning because the moving object will always move towards the first waypoint
public bool inReverse = true;