Skip to content

Instantly share code, notes, and snippets.

Stany MARCEL ynsta

Block or report user

Report or block ynsta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ynsta /
Last active Sep 25, 2017
Steam vdf/json converters
#!/usr/bin/env python
import json
def json2vdf(stream):
Read a json file and return a string in Steam vdf format
ynsta /
Last active Jul 24, 2018
Blur konsole and yakuake instead of simple transparency
# add to zshrc
function blur-konsoles() {
windows=($(qdbus org.kde.konsole 2>/dev/null | egrep '^\/konsole\/MainWindow_[0-9]+$'))
for win in ${windows}; do
winId=$(qdbus org.kde.konsole $win winId 2>/dev/null)
[ ! -z "${winId}" ] && xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id "${winId}"
qdbus org.kde.yakuake &>/dev/null && xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -name Yakuake
[ ! -z "$KONSOLE_DBUS_WINDOW" ] && blur-konsoles
ynsta / stm32f7x.cfg
Created Jun 24, 2015
OpenOCD 0.9.0 config for STM32F746G-DISCO target (stm32f746ng)
View stm32f7x.cfg
# script for stm32f7x family
# stm32 devices support both JTAG and SWD transports.
source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
ynsta /
Last active Apr 25, 2019
Statistic profiling on stm32f4 with openocd by dwt_pcsr sampling
# run openocd (0.9.0) with :
# $ openocd -f stlink-v2-1.cfg -f stm32f4x.cfg &> /dev/null"
# then run
# $ python2 path_to_myelf_with_symbols
import sys
import time
import telnetlib
ynsta / WellerRTProto.ino
Created Jul 1, 2014
Weller RT Station PID Protoype
View WellerRTProto.ino
#define TEMPERATURE 350
#define PWM_PIN 3
#define PWM_MAX 245
#define PID_INT_MAX (500)
#define TEMP_GAIN 0.42
ynsta /
Created Jun 11, 2014
bashrc: git-delivery shell function
function git-delivery() {
git status >/dev/null || return 1
dtag=$(git describe --abbrev=0 --tags 2>/dev/null | git log -1 --pretty='%h')
for i; do
case $i in
cat <<EOF
usage: git-delivery [tag] [ext]
ynsta / .bashrc
Last active Aug 29, 2015
bashrc: absdir and setenv functions
View .bashrc
function absdir() {
for i; do
python -c "import os; print os.path.abspath('$i')"
function setenv() {
for env ; do
if [ -d "${env}" ]; then
env=$(absdir "$env")
ynsta /
Last active Mar 16, 2016
Protect files in each directory recursively using par2. It repairs and updates with par2, if only adler32 sum of files does not match.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import zlib
import ctypes
import subprocess
DESCRIPTION = 'Protect files in directories recursively with par2.'
You can’t perform that action at this time.