Skip to content

Instantly share code, notes, and snippets.

View Psycojoker's full-sized avatar
💭
I'm really busy right now, I can take weeks to answer.

Bram Psycojoker

💭
I'm really busy right now, I can take weeks to answer.
View GitHub Profile
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)
#!/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"
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
import os
import sys
import shutil
import noise
import moviepy
from PIL import Image
from moviepy.editor import ImageClip, ImageSequenceClip, CompositeVideoClip
width = 500
import noise
width = 600
height = 300
freq = 160.0
image = Image.new("RGBA", (width, height))
pixels = image.load()
#############################
# unittests.py #
#############################
unittests:
category_help: Launch unit tests. ONLY FOR DEV
actions:
### unittests_launch()
launch:
action_help: launch all unit tests
import re
hosts = open("/etc/hosts", "r").read()
# remove comments
hosts = re.sub("#.*[^\n]", "", hosts)
# split everywords
hosts = re.split("\s+", hosts)
# 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')
@ 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.
# 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']))