Skip to content

Instantly share code, notes, and snippets.

View Upliner's full-sized avatar

Upliner Mikhalych Upliner

View GitHub Profile
@Upliner
Upliner / rigify_sliding_joints.yaml
Last active August 13, 2023 04:18
rigify_sliding_joints.yaml
-
tweak: rigify_sliding_joint
upper_bone: upper_arm
lower_bone: forearm
side: L
influence: 0.08
-
tweak: rigify_sliding_joint
upper_bone: upper_arm
lower_bone: forearm
@Upliner
Upliner / MessagesSib.php
Last active October 7, 2021 22:38
Siberian wiki translation json files
<?php
/** Siberian (сибирской)
*
* @ingroup Language
* @file
*
* @author AVRS
* @author Agilight
* @author Ahonc
* @author Aleksandrit
@Upliner
Upliner / pre-commit
Created May 21, 2018 13:54
The git hook that checks validity of .json files in the repository
#!/bin/bash
exec 1>&2
git diff --cached --name-only --diff-filter=d -z HEAD | while IFS= read -r -d '' file ; do
if [ "${file##*.}" = "json" ]; then
if ! cat $file | python -m json.tool > /dev/null; then
echo $file
exit 1
fi
fi
@Upliner
Upliner / vol.py
Last active August 4, 2017 12:49
Volume measurer in Python
#!/usr/bin/python3
import sys
from pydub import AudioSegment
if len(sys.argv) < 3:
print("Usage: vol.py fps file.mp3")
sys.exit(1)
fps = int(sys.argv[1])
[{"Name":"1","Type":"Exit","Location":{"X":23850,"Y":14850,"Z":0},"TargetLocation":{"X":0,"Y":0,"Z":0}},
{"Name":"2","Type":"VisibleTrap","Location":{"X":1950,"Y":150,"Z":0},"TargetLocation":{"X":0,"Y":0,"Z":0}},
{"Name":"3","Type":"JetPackPickup","Location":{"X":2550,"Y":150,"Z":0},"TargetLocation":{"X":2550,"Y":150,"Z":0}},
{"Name":"4","Type":"Wall","Location":{"X":2850,"Y":150,"Z":150},"TargetLocation":{"X":2850,"Y":150,"Z":0}},
{"Name":"5","Type":"SKEY","Location":{"X":3150,"Y":150,"Z":0},"TargetLocation":{"X":4350,"Y":12450,"Z":0}},
{"Name":"6","Type":"Detonation_button","Location":{"X":3450,"Y":150,"Z":0},"TargetLocation":{"X":4350,"Y":3450,"Z":150}},
{"Name":"7","Type":"Detonation_button","Location":{"X":3750,"Y":150,"Z":0},"TargetLocation":{"X":4650,"Y":750,"Z":150}},
{"Name":"8","Type":"Detonation_button","Location":{"X":4050,"Y":150,"Z":0},"TargetLocation":{"X":4350,"Y":750,"Z":150}},
{"Name":"9","Type":"Detonation_button","Location":{"X":4350,"Y":150,"Z":0},"TargetLocation":{"X":4350,"Y":1050,"Z":1
--- Type Location TargetLocation
1 Exit (X=23850,Y=14850,Z=0) (X=0,Y=0,Z=0)
2 VisibleTrap (X=1950,Y=150,Z=0) (X=0,Y=0,Z=0)
3 JetPackPickup (X=2550,Y=150,Z=0) (X=2550,Y=150,Z=0)
4 Wall (X=2850,Y=150,Z=150) (X=2850,Y=150,Z=0)
5 SKEY (X=3150,Y=150,Z=0) (X=4350,Y=12450,Z=0)
6 Detonation_button (X=3450,Y=150,Z=0) (X=4350,Y=3450,Z=150)
7 Detonation_button (X=3750,Y=150,Z=0) (X=4650,Y=750,Z=150)
8 Detonation_button (X=4050,Y=150,Z=0) (X=4350,Y=750,Z=150)
9 Detonation_button (X=4350,Y=150,Z=0) (X=4350,Y=1050,Z=150)
#!/usr/bin/python
import sys
from struct import unpack
typs = [False,"Wall","SmashWall","InvisibleTrap","JetPackPickup","RiflePickup","OneWayer",False, False,"Detonation_button","Teleport","AntiAir","VisibleTrap","InactiveTrap","Wall","Railing","Railing","Railing"]
zmap = [0,150] + [0] * 20
zmap[14] = 450
zmap[16] = 300
zmap[17] = 300
using System;
using System.Collections.Generic;
using System.Threading;
namespace MyCoolProject
{
/**<summary>
* Fact of existence of this exception causes immediate termination.
* </summary>
* <remarks>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <endian.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <libavcodec/avcodec.h>
#include <stdint.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdint.h>
#include <linux/limits.h>
#include <sys/stat.h>