Skip to content

Instantly share code, notes, and snippets.

@che0
che0 / txt2img.py
Created May 3, 2024 10:44
txt2img
#!/usr/bin/env python3
import requests
import argparse
import os
import json
import logging
import datetime
import re
@che0
che0 / whatsapp2tsv.py
Created January 5, 2024 19:41
Takes txt export from WhatsApp and transforms it to TSV file (with `[LF]` for newlines in messages).
import sys
import re
from xlsxwriter import Workbook
class Consumer:
def __init__(self):
self.prev = None
def _text_line(self, text):
@che0
che0 / countdown-to-file.lua
Created December 13, 2021 14:47
OBS studio script that creates countdown timer to time given in an external file
obs = obslua
source_name = ""
timestamp_file = ""
cur_seconds = 0
last_text = ""
activated = false
local function get_seconds_from_file()
@che0
che0 / userChrome.css
Created August 20, 2021 16:21
userChrome.css for Firefox 91
/*
* Edit this file and copy it as userChrome.css into your
* profile-directory/chrome/
*/
/*
* This file can be used to customize the look of Mozilla's user interface
* You should consider using !important on rules which you want to
* override default settings.
*/
@che0
che0 / corrupt.c
Created October 13, 2020 12:50
simple tool for corrupting files
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char ** argv)
@che0
che0 / swift-example.py
Last active October 7, 2019 09:52
OpenStack Swift object operations with Python
#!/usr/bin/env python3
from swiftclient.service import SwiftService, SwiftUploadObject
import os
import argparse
import requests
import json
import datetime
import pytz

Obecně skutečnou svobodu oslabuje vše, co zpřetrhává její vazbu k osobní odpovědnosti. To se na jednu stranu děje ve jménu extrémního individualismu, redukce svobody na obyčejný pud, kultura maximální individuální seberealizace bez ohledu na následky a snahy vyvázat jednotlivce ze všech zděděných a přirozených vazeb a identit – od pohlaví, přes rodinu a morálku až po národ.

https://www.parlamentnilisty.cz/arena/rozhovory/Videl-jsem-co-chce-EU-delat-s-medii-To-nedopadne-dobre-uvadi-publicista-Andrej-Duhan-571525

@che0
che0 / szn-photos.geojson
Created August 6, 2019 13:48
szn photos
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@che0
che0 / dedicnost.py
Last active March 24, 2019 20:30
Přenesení do nadtřídy na příkladu per-object pole v ModelAdminu
from django.contrib import admin
class PredtimModelAdmin1(admin.ModelAdmin):
def predim_get_formfield1(self, db_field, request, obj, **kwargs):
return buhvico_1
def get_form(self, request, obj=None, change=False, **kwargs):
...
defaults = {
'form': form,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.