Skip to content

Instantly share code, notes, and snippets.

@rraallvv
rraallvv / space_view3d_turntable_y_up.py
Last active September 28, 2023 21:57
Enable turntable rotation with Y axis up.
'''
Enable turntable rotation with Y axis up.
'''
bl_info = {
'name': 'Rotate Turntable Y-axis Up',
'author': '',
'version': (0, 0, 1),
'blender': (2, 6, 7),
'location': '3d view > Ctrl + LMB-drag',
@rraallvv
rraallvv / cambridge_dictionary.py
Created August 12, 2017 16:42
Cambridge Dictionary IPA phonetic transcription
#!/usr/bin/python
import requests
from lxml import html
import re
from random import randint
from time import sleep
import sys
import random
import fake_useragent
@rraallvv
rraallvv / space_view3d_pan_naturally.py
Created July 13, 2013 06:03
Natural panning to older versions of Blender
bl_info = {
'name': 'Pan naturally',
'author': '',
'version': (0, 0, 1),
'blender': (2, 6, 0),
'location': '3d view > Alt + LMB-drag',
'description': 'Pan view naturally for older Blender versions.',
'wiki_url': '',
'tracker_url': '',
'category': '3D View'}
@rraallvv
rraallvv / open-cloudflare_(firewalld).sh
Last active November 19, 2022 22:44
Open public ports to Cloudflare for Firewalld
#!/usr/bin/env bash
# Instructions:
#
# 1) Place this script in the /root/ directory, give it proper permissions.
# $ sudo chmod +x /root/open-cloudflare.sh
#
# 2) Open the cron job editor
# $ sudo crontab -e
#
@rraallvv
rraallvv / copy.js
Created June 18, 2016 17:55
[Node.js] copy dir recursively
var fs = require('fs');
var copy = function(srcDir, dstDir) {
var results = [];
var list = fs.readdirSync(srcDir);
var src, dst;
list.forEach(function(file) {
src = srcDir + '/' + file;
dst = dstDir + '/' + file;
//console.log(src);
var stat = fs.statSync(src);
@rraallvv
rraallvv / gist:2954726
Created June 19, 2012 15:16
Convert NSString to char array
NSString *s = @"Some string";
const char *c = [s UTF8String];
@rraallvv
rraallvv / ffmpg_mp3_normalization.sh
Last active March 2, 2022 07:56
FFMPEG mp3 normalization
#!/bin/bash
find . -type f -not -name ".*" -print0 | while read -d $'\0' file; do
echo $file
level=$(ffmpeg -y -nostdin -i $file -af "volumedetect" -vn -sn -dn -f null /dev/null 2>&1 | grep max_volume | sed -n 's/.*max_volume: \([^ ]*\) .*/\1/p')
gain=$(bc -l <<< "-($level)")
echo "${gain}dB"
ffmpeg -y -nostdin -loglevel panic -i $file -af "volume=${gain}dB" temp.mp3
rm $file
mv temp.mp3 $file
done
@rraallvv
rraallvv / MultichannelCoreMidiExample.cpp
Last active January 1, 2022 11:10
Multichannel CoreMidi Example
#include <iostream>
#include <AudioToolbox/AudioToolbox.h>
#include "CAComponent.h"
int main (int argc, char * const argv[]) {
AUGraph graph;
AUNode outputNode, mixerNode, dlsNodeA, dlsNodeB, dlsNodeC;
AudioUnit dlsA, dlsB, dlsC;
//Setup Graph
@rraallvv
rraallvv / git-ftp.md
Last active May 27, 2021 19:06
Working with git-ftp on macOS client and vsftpd on Linux server

Working with git-ftp on macOS client and vsftpd on Linux server

Generate SSL certificate and key

$ openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout ~/.ssh/vsftpd.key -out ~/.ssh/vsftpd.crt

Add the generated certificate to the Keychain Access app

@rraallvv
rraallvv / Logic_Pro_X_package_downloads.txt
Last active January 12, 2021 16:00 — forked from rickychilcott/gist:3222c15663dac7d987a1
Logic Pro X Package Downloads
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/GarageBandBasicContent.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/JamPack1.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/JamPack4_Instruments.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsChillwave.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsDeepHouse.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsDubstep.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsElectroHouse.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsHipHop.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsLegacy1.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsLegacyRemix.pkg