Skip to content

Instantly share code, notes, and snippets.

View Allakazan's full-sized avatar
👽

Bruno Marques Allakazan

👽
View GitHub Profile
@Allakazan
Allakazan / your-project.service
Last active March 16, 2020 01:54
Node Js service on Systemd
# this file need to be on /etc/systemd/system/
[Unit]
Description=Your Node Service
After=network.target
[Service]
User=root
WorkingDirectory=/path/to/your/node-project
ExecStart=/usr/bin/node /path/to/your/node-project/index.js
@Allakazan
Allakazan / install_voices.sh
Created October 22, 2020 01:48 — forked from kastnerkyle/install_voices.sh
Install festival and festival voices in Ubuntu
# https://ubuntuforums.org/archive/index.php/t-751169.html
sudo apt-get install -y festival festlex-cmu festlex-poslex festlex-oald libestools1.2 unzip
sudo apt-get install -y festvox-don festvox-rablpc16k festvox-kallpc16k festvox-kdlpc16k
mkdir cmu_tmp
pushd .
cd cmu_tmp/
wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_awb_arctic-0.90-release.tar.bz2
wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_bdl_arctic-0.95-release.tar.bz2
@Allakazan
Allakazan / walk_array.php
Created December 17, 2020 18:32 — forked from mlconnor/walk_array.php
php function to walk an array/object recursively
/**
* works for json objects. will replace all
* keys and values with the result of the
* closure.
*/
function walk_recursive($obj, $closure) {
if ( is_object($obj) ) {
$newObj = new stdClass();
foreach ($obj as $property => $value) {
$newProperty = $closure($property);