Skip to content

Instantly share code, notes, and snippets.

@dpaletti
dpaletti / py_poetry_colab.md
Last active May 20, 2024 14:28
Run python poetry project on Colab

Python Poetry Project on Colab

Clone Github Repository

Move in "/content"

  import os
  os.chdir("/content")

Setup git email and username

@parterburn
parterburn / custom_warp_script.applescript
Created September 27, 2022 16:51
An easy way to use the Warp terminal (https://www.warp.dev/) with Alfred.
-- For the latest version:
-- https://gist.github.com/parterburn/e832b9090ee35eb830529de8bd978b82
-- Set this property to true to always open in a new window
property open_in_new_window : false
-- Set this property to false to reuse the current tab
property open_in_new_tab : true
-- Handlers

Готовый образ под M1 selenoid dumbdumbych/selenium_vnc_chrome_arm64:91.0.b

  1. Скачиваем рабочий образ под m1
docker pull dumbdumbych/selenium_vnc_chrome_arm64:91.0.b
  1. Создаем в папке config файл browsers.json со следующим содержимым
@Morreski
Morreski / timed_cache.py
Last active December 21, 2023 18:17
Python lru_cache with timeout
from datetime import datetime, timedelta
import functools
def timed_cache(**timedelta_kwargs):
def _wrapper(f):
update_delta = timedelta(**timedelta_kwargs)
next_update = datetime.utcnow() + update_delta
# Apply @lru_cache to f with no cache size limit
@dtcooper
dtcooper / install_liquidsoap_latest.sh
Last active January 3, 2020 15:35
Various Liquidsoap Install Scripts for Ubuntu 16.04 LTS
#!/bin/sh
sudo apt-get install -y build-essential git automake
mkdir -p "$HOME/liquidsoap-build"
cd "$HOME/liquidsoap-build"
wget https://github.com/savonet/liquidsoap/releases/download/1.3.0/liquidsoap-1.3.0-full.tar.gz
tar xvzf liquidsoap-1.3.0-full.tar.gz
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active June 1, 2024 18:42
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@grudko
grudko / gist:4c1dcd2a2eb29bc3d98cd19bfd916cbd
Created December 2, 2016 13:16
Asyncio aiohttp example with PonyORM
#!/usr/bin/env python3
import asyncio
from asyncio_extras import threadpool
from aiohttp import web
from pony.orm import *
db = Database()
@nooitaf
nooitaf / obs-start.sh
Last active November 9, 2020 10:38
obs cli options
obs --startrecording --startstreaming
# For OBS Studio,
# --collection [scene collection name],
# --profile [profile name],
# --scene [scene name],
# --startstreaming,
# --startrecording.
# https://obsproject.com/forum/threads/obs-studio-command-line-parameters.56185/
@Yorkshireman
Yorkshireman / circle.yml
Created June 29, 2016 15:37
Installing Chrome on Circle CI machine (Ubuntu 14.04)
dependencies:
pre:
- sudo apt-get install libxss1 libappindicator1 libindicator7
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i ./google-chrome*.deb
- sudo apt-get install -f