Skip to content

Instantly share code, notes, and snippets.

View fovtran's full-sized avatar
💭
I may be slow to respond.

Diego C. fovtran

💭
I may be slow to respond.
  • DMC
  • Argentina
View GitHub Profile
@fovtran
fovtran / config-6.9.1-custom
Created June 3, 2024 20:06
Kernel-conf-6.9.1-custom
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.9.1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 12.2.0-14) 12.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24000
#!/usr/bin/env python3.11
import pyperclip as pc
from time import sleep
import numpy as np
class NC(object):
def __init__(self):
self.idx = 0
self.paste = pc.paste()
@fovtran
fovtran / alsa-input-switch.lua
Created April 3, 2023 11:44
ardour alsa input switcher
-- change alsa input source for hda realtek codec (ALC888)
ardour {
["type"] = "EditorAction",
name = "ALSA Mixer Store",
author = "DMC",
description = [[
ALSA Capture sources
]]
}
@fovtran
fovtran / build-python3.11.sh
Created December 11, 2022 07:51
Build python-3.11.1 with cpuflags+clang
export BUILDDIR=/tmp/Python-3.11.1
cd ${BUILDDIR}
export PREFIX=/tmp/python-3.11.1
export VENV=/home/nosat/venv-3.11.1
export OPTS="--with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2 --with-ssl-default-suites=python,openssl --with-lto=full --with-readline=editline --with-system-expat --enable-loadable-sqlite-extensions --enable-optimizations"
export EXTENSIONS="-mmmx -mcx16 -msse3 -mpopcnt -msse4a -msse2 -mclflushopt -mfxsr -msse -mabm"
export CFLAGS="-march=athlon64-sse3 $EXTENSIONS -O3 -pipe"
export CPPFLAGS="-march=athlon64-sse3 $EXTENSIONS -O3 -pipe"
export CFLAGS="$CFLAGS -Wno-unused-value -Wno-empty-body"
CC="clang-16"
@fovtran
fovtran / trapper.sh
Created November 9, 2022 13:23
feature shell script missing manteinance
#!/bin/sh
### BEGIN INIT INFO
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/xbin/daemon
BNAME=systapper
DESC="Init startup functions"
PIDFILE="/run/$NAME.pid"
DOPTIONS=""
@fovtran
fovtran / barrier_and_mutex.cpp
Created August 13, 2021 19:01
comparing mfence and mutes
// g++ -O3 -lpthread -march=athlon64-sse3 -std=c++17 barier_and_mutexes.cpp -o barrier_and_mutexes
#include <stdio.h>
#include <cstdint>
#include <cstdlib>
#include <atomic>
#include <vector>
#include <thread>
#include <mutex>
#include <cassert>
#!which python.exe
# coding: utf-8
from __future__ import print_function
__author__ = "Diego <dcadogan@live.com.ar>"
__version__ = '0.1'
print('IPython autoconf')
import os
import platform, sys
from math import radians, degrees
@fovtran
fovtran / pip_auto_installs.py
Created June 16, 2020 17:16
Pip automated installs
import pip
def install(package):
pip.main(['install --force', package])
try:
import requests
except:
install('requests==2.23.0')
@fovtran
fovtran / cube3d
Last active March 10, 2019 06:15
WebGL cube
<html>
<head>
<script src="three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/102/three.min.js"></script>
<script src="orbitcontrols.js"></script>
</head>
<body> <div name="canvas" width="100%" height="100%"></div> </body>
<script>
@fovtran
fovtran / qt_list_ui_components.py
Created September 12, 2018 07:32
QT Ui file Widgets bindings generator
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""qt_list_ui_widgets.py: Provides a list of QT5 widgets contained in a XML UI file made with QTCreator."""
__author__ = "dmc"
__license__ = "GPL"
__version__ = "1.0.1"
__email__ = "dcadogan@live.com.ar"
__status__ = "Testing"
import sys,os