This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import json | |
for i in sys.argv[1:]: | |
for app, data in json.load(open(i)).items(): | |
missing = [] | |
missing_help = [] | |
for number, question in enumerate(data["manifest"]["arguments"]["install"], 1): | |
if not question["ask"].get("en"): | |
missing.append(number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TARGET=/where/you/want/ | |
find $1 -maxdepth 1 -iname "[^.]*" -mtime +100 -type f | while read -r i | |
do | |
if [ -e "${TARGET}${i}" ] | |
then | |
new_name=${RANDOM}-$i | |
echo "$i -> ${TARGET}$new_name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import shutil | |
import noise | |
import moviepy | |
from random import randint | |
from PIL import Image | |
from moviepy.editor import ImageClip, ImageSequenceClip, CompositeVideoClip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import shutil | |
import noise | |
import moviepy | |
from PIL import Image | |
from moviepy.editor import ImageClip, ImageSequenceClip, CompositeVideoClip | |
width = 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import noise | |
width = 600 | |
height = 300 | |
freq = 160.0 | |
image = Image.new("RGBA", (width, height)) | |
pixels = image.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################# | |
# unittests.py # | |
############################# | |
unittests: | |
category_help: Launch unit tests. ONLY FOR DEV | |
actions: | |
### unittests_launch() | |
launch: | |
action_help: launch all unit tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
hosts = open("/etc/hosts", "r").read() | |
# remove comments | |
hosts = re.sub("#.*[^\n]", "", hosts) | |
# split everywords | |
hosts = re.split("\s+", hosts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# un_projet_django.py | |
import os | |
from caprice import require, common, unix, file | |
# require check if pkg is installed, otherwise installed it | |
# can require a specific version | |
postgresql = require('postgresql') | |
nginx = require('nginx') | |
supervisord = require('supervisord') | |
git = require('git') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ 3600 IN A 123.123.123.123 | |
* 3600 IN A 123.123.123.123 | |
_xmpp-client._tcp 3600 IN SRV 0 5 5222 domain.tld. | |
_xmpp-server._tcp 3600 IN SRV 0 5 5269 domain.tld. | |
muc 3600 IN CNAME @ | |
pubsub 3600 IN CNAME @ | |
vjud 3600 IN CNAME @ | |
@ 3600 IN MX 10 domain.tld. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# condition originelle | |
(new_app_dict['lastUpdate'] > current_app_dict['lastUpdate']) \ | |
or ('update_time' not in current_app_dict['settings'] \ | |
and (new_app_dict['lastUpdate'] > current_app_dict['settings']['install_time'])) \ | |
or ('update_time' in current_app_dict['settings'] \ | |
and (new_app_dict['lastUpdate'] > current_app_dict['settings']['update_time'])) |