Skip to content

Instantly share code, notes, and snippets.

View braytac's full-sized avatar

braytac braytac

View GitHub Profile
@braytac
braytac / tetrodes_pentodes.sub
Created December 17, 2020 19:27 — forked from chanmix51/tetrodes_pentodes.sub
LTSpice models for vacuum tubes
*--------------------------------------------------------------------------
* Model generated by Motega software:
*
* Modeling Of Tubes Employing Genetic Algorithms
*
* Models contain 1G resistors from all nodes to earth in order to avoid
* floating nodes. Triode and tetrode/pentode models contain a diode for
* simulating grid current.
*
* Non-commercial use is permitted, but at your own risk... This model
@braytac
braytac / genpdf.php
Created August 22, 2020 05:39
gen txt list for montpres pdf.php
<?php
function human_filesize($bytes, $decimals = 1) {
$sz = 'BKMGTP';
$factor = floor((strlen($bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
}
$folder = "/home/webs/montpres/wp-content/uploads/molt_psp_familias_completas";
$genlist = "/home/webs/montpres/wp-content/pdf_generados.txt";
@braytac
braytac / MyArch
Created July 16, 2020 13:05
my archlinux customiz
/etc/polkit-1/rules.d/10-udisks2.rules
// See the polkit(8) man page for more information
// about configuring polkit.
// Allow udisks2 to mount devices without authentication
// for users in the "wheel" group.
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
action.id == "org.freedesktop.udisks2.filesystem-mount") &&
@braytac
braytac / loggingGUI.py
Created May 26, 2020 05:12 — forked from bitsgalore/loggingGUI.py
Minimal threaded GUI application with logging to both text file and ScrolledText widget
#! /usr/bin/env python
import time
import threading
import logging
try:
import tkinter as tk # Python 3.x
import tkinter.scrolledtext as ScrolledText
except ImportError:
import Tkinter as tk # Python 2.x
import ScrolledText
@braytac
braytac / grub.cfg
Last active January 13, 2021 02:56 — forked from Pysis868/grub.cfg
Bootear ISOS del HD con GRUB2 - Basado en post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-boot-usb
# MAS USADOS POR MI:
# PROBLEMAS CON grub2win y PC con EFI: no va a andar con loopback loop, vocar en subdirectorio:
# c:\ubuntustudio\{casper....}
menuentry 'Ubuntu Studio' {
set root='(hd1,gpt3)'
linux /ubuntustudio/casper/vmlinuz boot=casper ignore_uuid file=/pressed/ubuntustudio.seed live-media-path=/ubuntustudio/casper ignore_uuid locale=es_AR.UTF-8 mitigations=off
initrd /ubuntustudio/casper/initrd
}
# ELIVE STABLE
@braytac
braytac / VideoStream.php
Last active February 15, 2020 09:00 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
#!/bin/bash
# http://askubuntu.com/questions/107726/how-to-create-animated-gif-images-of-a-screencast#answer-201018
# 1. Run byzanz-record-window 30 -c output.gif
# 2. Go to the window (alt-tab) you want to capture. Click on it.
# 3. Wait 10 seconds (hard-coded in $DELAY), in which you prepare for recording.
# 4. After the beep (defined in the beep function), byzanz will start.
# 5. After 30 seconds (that's the meaning of 30 in step 1), byzanz ends. A beep will be broadcast again.
@braytac
braytac / extract.sh
Created November 2, 2018 22:57 — forked from poppingtonic/extract.sh
convert a PDF to TIFF using gs, convert from TIFF to txt using tesseract
# $1 is the first argument
# remove result.txt
#rm output/result.txt
fname=`echo "$1" | awk -F "/" '{print $(NF)}'`
# convert the pdf to a group of tiffs
if [ ! -e extracted_tz_parliament/$fname.txt ];
then
@braytac
braytac / DetectorDuplicadosCSSPK.sql
Last active October 30, 2018 12:34
Detectar y eliminar pagos duplicados, recalcular cta. cte. y reprocesar planes de pagos
*/","Kine",
"/* Buscar duplicados */
/* que no tienen bill (POR LINK)*/
SELECT
CSSPK_BILL_AFFILIATE_CORE.matricula,
CSSPK_BILL_PAY.methodOfPayment,
bill , imputationDate as FechaImputacion,
CAST(GROUP_CONCAT(DISTINCT CSSPK_BILL_PAY.id) AS CHAR) AS PagosID,
@braytac
braytac / speed_boot
Last active September 26, 2019 14:32
Cosas que no suelo necesitar en el arranque de manjaro/arch
# EN GRUB: desactivar mitigaciones si no me interesan (+perf. Intel)
noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off
pacman -Rsc plymouth
pacman -Rsc mlocate
pacman -Rsc ntp
pacman -Rsc tlp
pacman -Rsc accountsservice
systemctl mask updatedb.service