Skip to content

Instantly share code, notes, and snippets.

View ddrigass's full-sized avatar
🌐
Develop the world

ddrigass ddrigass

🌐
Develop the world
View GitHub Profile
@ddrigass
ddrigass / remove-unused-files.py
Last active August 7, 2020 10:56
Python 3 script to remove unused files. Example: remove old pictures from a project.
import os
dirName = '/home/dir/project'
imageFormats = ['.png', '.jpeg', '.gif', '.svg', '.jpg']
imagesIgnore = ['node_modules', 'build']
sourceIncludes = ['.js', '.php', '.html']
sourceIgnore = ['node_modules', 'build']
@ddrigass
ddrigass / .cpanel.yml
Created August 7, 2020 11:00
Wordpress Cpanel deployment file (for git)
deployment:
tasks:
- export WPC=/home/coelix/public_html/wp-content/
- /bin/rm -rf $WPC
- /bin/mkdir $WPC
- /bin/cp -r * $WPC
@ddrigass
ddrigass / xlsxtomo.js
Created September 18, 2020 07:51
Fill .mo and .xliff file from .xlsx spreadsheet
const PO = require('pofile');
const xlsx = require('node-xlsx');
const fs = require('fs');
const xlsxFile = xlsx.parse(`${__dirname}/languages2.xlsx`);
const websiteList = xlsxFile[0];
let notTranslated = [];