Skip to content

Instantly share code, notes, and snippets.

@leohoy
leohoy / ALKIS.py
Last active May 6, 2024 15:08
A python based NAS XML converter to any geo format with the help of gdal and geopandas
from osgeo import ogr
import os
import geopandas as gp
from sys import getsizeof
dictwhichfileiswhichclass={}
for filename in os.listdir('ALKIS'):
if filename.endswith(".xml"):
file1 = open('ALKIS/{}'.format(filename), "r+")
data = file1.read()
@luzfcb
luzfcb / configurar_pyenv.md
Last active May 6, 2024 15:08
instalar pyenv no ubuntu
@mimukit
mimukit / block_youtube_shots.md
Created December 6, 2022 18:33
Disable youtube shots on browser using ublock origin

How to block youtube shorts using ublock origin

  • Add the following script to your ad blocker. I used Ublock Origin (Dashboard > My Filters). It may work with other add-ons.
www.youtube.com##:xpath(//ytd-grid-video-renderer[descendant::a[contains(@href,"shorts")] and not(contains(@class,"shelf"))])
  • Click on Apply changes.
@AustinEast
AustinEast / haxeflixel-pixel-perfect.md
Last active May 6, 2024 15:07
Pixel perfect rendering with HaxeFlixel on desktop targets

To get Haxeflixel to maintain 1:1 pixel rendering at any scale for desktop targets:

In your Project.xml, add a new window property with an desktop conditional, resizable set to false, and the desired width/height to match the resolution you'd like to maintain.

<window if="desktop" resizable="false" width="320" height="180" />

Apply a shader to the FlxGame instance or the main FlxCamera instance as a filter. The base FlxShader can even just be used if the project doesn't require custom shaders.

FlxG.game.setFilters([new ShaderFilter(new FlxShader())]);
@scivision
scivision / Readme.md
Last active May 6, 2024 15:05
build script for LLVM & Flang-f18 Fortran compiler

Build script for Flang-f18 + LLVM

This is a Bash script (macOS, Linux, ...) for building Flang-f18 and LLVM from source. It is adapted from Jeff Hammond

Ninja is recommended for best build efficiency and speed.

bash build-flang-f18.sh
@mattiasgustavsson
mattiasgustavsson / gist:b97e9e59e5e1742dcabff60179fcda67
Created April 7, 2022 14:13
Simple string allocation system, allowing for freeing all allocated strings in one go
#define STR_NEW( pool, str ) ( pool = memcpy( (char*) memcpy( malloc( ( str ? strlen( str ) : 0 ) + 1 + \
sizeof( char* ) ), &pool, sizeof( char* ) ) + sizeof( char*), str ? str : "", ( str ? strlen( str ) : 0 ) + 1 ) )
#define STR_FREE( pool ) while( pool ) { char* STR_FREE_TMP = ( pool - sizeof( char* ) ); \
pool = ( *(char**)STR_FREE_TMP ); free( STR_FREE_TMP ); }
//---------------------------
char* strpool = NULL;
@BlueSwordM
BlueSwordM / Simple SVT-AV1 Beginner Guide Part 1.md
Last active May 6, 2024 15:02
Simple SVT-AV1 Beginner Guide Part 1

Since we're dealing with simpler AV1 encoding, that does mean we'll be eskewing aomenc-av1, since it requires 2-pass encoding to be able to take advantage of it, and I use it externally since I have access to a special build.

Now, let's get on with the simple guide.

You'll first need to be reasonably competent with command line builds or use a recent up to date ffmpeg GUI with support for SVT-AV1.

As such, I would recommend getting a master git ffmpeg build for the operating system of your choice right here:

https://github.com/BtbN/FFmpeg-Builds

@matiasinsaurralde
matiasinsaurralde / Makefile
Created August 24, 2016 11:39 — forked from huxuan/Makefile
Hello World for LuaJIT FFI/C++ binding.
all: lib run
lib:
g++ -shared -fPIC -o libhello.so libhello.cpp hello.cpp
run:
luajit main.lua
clean:
rm *.so
@kekru
kekru / 01nginx-tls-sni.md
Last active May 6, 2024 14:59
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@liuran001
liuran001 / config.yaml
Last active May 6, 2024 14:58
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.4.1-231211
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
# 虚空终端 (Clash Meta) Docs 地址: https://wiki.metacubex.one