Skip to content

Instantly share code, notes, and snippets.

View pwqw's full-sized avatar
🍒
Rompiendo las guindas

Pin \\ pwqw

🍒
Rompiendo las guindas
View GitHub Profile
@pwqw
pwqw / simple_piano-1.scd
Created May 10, 2024 23:05
Simple Piano 1
/**
* A simple example of MIDI Keyboard for SuperCollider 3.6.x
*/
MIDIIn.connectAll;
s.boot;
(
SynthDef("umbSinewave",{
arg freq=440, gate=1, amp=1, pan=0;
@pwqw
pwqw / install_python_alt.py
Created March 18, 2024 14:06
Instalar diferentes versiones de python en entorno Debian-like
import os
import sys
import tarfile
import tempfile
from urllib import request
PYTHON_VERSION = input('Ingrese la version de python a instalar [3.9]: ')
if PYTHON_VERSION == '':
PYTHON_VERSION = '3.9'
@pwqw
pwqw / encuadernar.py
Last active July 20, 2022 12:34 — forked from mattlev2/split-page.py
Tomar un PDF vertical e imprimirlo para encuadernar
#!/usr/bin/env python3
import io
import math
import sys
import PyPDF2
def main(src, dst, pliegues=6):
pliegues = int(pliegues)
src_f = open(src, 'r+b')
@pwqw
pwqw / remove_gif_looping.md
Created July 7, 2018 06:59
Remove looping from GIF

Install gifsicle

sudo apt install gitsicle

Run

gifsicle --no-loopcount gifpath.gif > newgif.gif
@pwqw
pwqw / ubuntu-basic.sh
Last active July 7, 2019 19:10
Ubuntu basic packages
#!/bin/bash
sudo dpkg --configure -a;
sudo apt install -y ubuntu-restricted-extras;
sudo apt install -y exfat-fuse exfat-utils ffmpeg nethogs gcc make lame vorbis-tools zip unzip rar unrar git default-jdk net-tools;
sudo add-apt-repository -y "deb http://archive.canonical.com/ $(lsb_release -sc) partner";
sudo apt update;
sudo apt install -y adobe-flashplugin browser-plugin-freshplayer-pepperflash;
@pwqw
pwqw / recup_usb.md
Last active June 15, 2017 00:44
Recuperar archivos de un pendrive roto
@pwqw
pwqw / compilar-supercollider_ubuntu.md
Last active June 22, 2019 04:11
Compilar supercollider en Ubuntu y derivados

Compilar SuperCollider 3.10.2

Instalar dependencias necesarias

sudo apt-get install libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev libreadline6-dev libfftw3-dev libxt-dev libudev-dev pkg-config git cmake qt5-default qt5-qmake qttools5-dev qttools5-dev-tools qtdeclarative5-dev qtpositioning5-dev libqt5sensors5-dev libqt5opengl5-dev qtwebengine5-dev libqt5svg5-dev libqt5websockets5-dev

sudo apt-get install libjack-jackd2-dev

Si pregunta algo de otorgar prioridad de realtime a Jack Audio recomiendo que no (Estaría copado que sí, pero no se bien cómo configurarlo luego para que no requiera permisos de root).

@pwqw
pwqw / wav2mp3.sh
Created January 4, 2017 23:13
Search and convert all wav to mp3 audio files
#!/bin/bash
# requires ffmpeg
# apt install ffmpeg
find . -type f -iname "*.wav" -exec bash -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -acodec libmp3lame -ac 2 -ab 320k -ar 48000 "${FILE%.wav}.mp3";' _ '{}' \;
@pwqw
pwqw / mp42mp3.sh
Created January 4, 2017 23:04
Search and convert all mp4 videos to mp3 audio files
#!/bin/bash
# requires ffmpeg
# apt install ffmpeg
find . -type f -iname "*.mp4" -exec bash -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -acodec libmp3lame -ac 2 -ab 320k -ar 48000 "${FILE%.mp4}.mp3";' _ '{}' \;
@pwqw
pwqw / webm2mp3.sh
Last active January 4, 2017 23:03
Search and convert all webm videos to mp3 audio files
#!/bin/bash
# requires ffmpeg
# apt install ffmpeg
find . -type f -iname "*.webm" -exec bash -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -ab 320k -ar 44100 -y "${FILE%.webm}.mp3";' _ '{}' \;