Skip to content

Instantly share code, notes, and snippets.

View obiwankennedy's full-sized avatar
🎯
Focusing

Renaud G. obiwankennedy

🎯
Focusing
View GitHub Profile
@obiwankennedy
obiwankennedy / Git prompt
Created December 8, 2020 18:07
Git prompt
# ~/.bashrc
source ~/.git-prompt.sh
PS1='\[\e[0;32m\]\u\[\e[m\]@\h \[\e[1;34m\]\w\[\e[m\]$(__git_ps1 "[%s]")\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
___________________________________________________________
# ~/.git-prompt.sh
# bash/zsh git prompt support
#
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -c:a aac -strict -2 -b:a 128k output.mp4
@obiwankennedy
obiwankennedy / translate.py
Created March 29, 2019 10:22
Automatic translation of ts file (Qt i18n file) with Yandex
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import urllib.request
import xml.etree.ElementTree as ET
from yandex.Translater import Translater
import time
lang_dest="fr"
BasedOnStyle: LLVM
AccessModifierOffset: '-2'
AlignAfterOpenBracket: 'false'
AlignConsecutiveAssignments: 'false'
AlignOperands: 'true'
convert image.png -strip image.png
@obiwankennedy
obiwankennedy / compileQt.sh
Last active May 27, 2020 23:56
Compile qt on linux in opensource without interaction
#!/bin/sh
./configure -debug -opensource -developer-build -confirm-license
@obiwankennedy
obiwankennedy / CutSilentPartInVideo.py
Last active May 31, 2022 09:03
Found all videos from directories, then add opening and ending, then remove silent parts.
#!/usr/bin/python
#
# This Python script adds opening and ending on Roleplaying game videos then it cuts silent parts.
# Silent parts lasts 1 seconds at least of full silence.
# For more details, see this blog post:
# http://blog.rolisteam.org
#
# LICENCE: Creative Commons 0 - Public Domain
# I, the author of this script, wave any rights and place this work in the public domain.
@obiwankennedy
obiwankennedy / diceResult.svg
Last active March 2, 2019 07:55
SvgWithColor
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@obiwankennedy
obiwankennedy / qmlhighlighter.cpp
Last active September 26, 2018 16:03
QSyntaxHighlight for QML
/***************************************************************************
* Copyright (C) 2014 by Renaud Guezennec *
* http://www.rolisteam.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
@obiwankennedy
obiwankennedy / ToGray.sh
Last active December 6, 2016 08:54
Convert all images (png) to gray scaled images.
for i in *.png; do name=`echo $i | awk -F '.' '{print $1}'`; convert "$i" -colorspace Gray "$name-gray.png"; done