Skip to content

Instantly share code, notes, and snippets.

View kpostekk's full-sized avatar
🚅

Krystian Postek kpostekk

🚅
View GitHub Profile
@kpostekk
kpostekk / Treecapitator.cfg
Created May 21, 2019 13:33
Correct config for treecapitator and ic2
ic2 {
M:modID=ic2
S:axeIDList=ic2:bronze_axe; ic2:chainsaw
S:shearsIDList=ic2:chainsaw
# This setting controls whether or not the mod config section it appears in will override an IMC message sent by that mod. [default: false]
B:overrideIMC=false
ic2_rubber_tree {
S:logs=ic2:rubber_wood
S:leaves=ic2:leaves
}
@kpostekk
kpostekk / full_export.py
Created April 14, 2019 09:32
Simple python ffmpeg conversion script. From flac to mp3, aac and opus
import os
aac_cmd = 'ffmpeg -i "{file_name}" -c:a aac -b:a 256k aac/{output_name}.aac'
opus_cmd = 'ffmpeg -i "{file_name}" -c:a libopus -b:a 96k ./opus/{output_name}.opus'
mp3_cmd = 'ffmpeg -i "{file_name}" -c:a mp3 -b:a 128k ./mp3/{output_name}.mp3'
for d in ('mp3', 'opus', 'aac'):
os.mkdir(d)
counter = 1
@kpostekk
kpostekk / calculator.js
Created March 11, 2019 17:12
Simple BMI calculator
function in_range(x, min, max) {
return x >= min && x <= max;
}
function return_bmi(weight, height) {
// weight should be in kilograms
// height should be in meters
return weight / (height ** 2);
}
@kpostekk
kpostekk / ImionaMęskie.json
Created July 15, 2018 09:35
Polskie imiona oraz nazwiska (.txt .json)
[
"Abdon",
"Abel",
"Abelard",
"Abraham",
"Achilles",
"Adam",
"Adelard",
"Adnan",
"Adrian",
23:30:40.320 T:16496 NOTICE: special://profile/ is mapped to: special://masterprofile/
23:30:40.320 T:16496 NOTICE: -----------------------------------------------------------------------
23:30:40.320 T:16496 NOTICE: Starting Kodi (18.0-ALPHA1 Git:20180304-89a53e418e). Platform: Windows NT x86 64-bit
23:30:40.320 T:16496 NOTICE: Using Release Kodi x64 build
23:30:40.320 T:16496 NOTICE: Kodi compiled Mar 4 2018 by MSVC 191225835 for Windows NT x86 64-bit version 10.0 (0x0A000004)
23:30:40.320 T:16496 NOTICE: Running on Windows 10, kernel: Windows NT x86 64-bit version 10.0.16299
23:30:40.320 T:16496 NOTICE: FFmpeg version/source: 3.4.1-Kodi
23:30:40.320 T:16496 NOTICE: Host CPU: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz, 4 cores available
23:30:40.321 T:16496 NOTICE: Desktop Resolution: 1920x1080 32Bit at 60Hz

Instalacja serv.me (v2.x.x)

Wymagania

  • Serwer web (typu apache2)
  • php5
  • Specjalne API (dołączone ze stroną)

Instalacja

  1. Pobierz najnowszą wersję z GitHub'a (API + Strona) Pobieranie
  2. Wypakuj archiwa (np. na pulpit)
  3. Sprawdź czy pliki zostały odpowiednio wypakowana, tak że w folderze odrazu widać pliki (np. API/index.php)

Instalacja serv.me

Wymagania

  • Serwer typu apache2
  • php5
  • Klucz api do unturned-servers.net

Instalacja

  1. Pobierz najnowszą wersję z https://github.com/Backdoorek/serve-me/releases
  2. Rozpakuj ją i przenieś do folderu, do którego chcesz
  3. Teraz w linijce 8. zmień http:\\api.backdoorek.eu na swój aders przyszłęgo api
  4. Pobierz plik nazwany servme-apitranslator.zip
@kpostekk
kpostekk / index.php
Created January 22, 2018 17:53
Simple php script whixh returns state of selected user.
<?php
/**
* Created by PhpStorm.
* Date: 22.01.2018
* Time: 18:28
*/
$API_response = json_decode(file_get_contents("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=<ENTER YOUR STEAM WEB API KEY HERE>&steamids=76561198199780254"), true);
$state = $API_response['response']['players'][0]['personastate'];
switch ($state){
case 0:
@kpostekk
kpostekk / bioValues.py
Last active December 10, 2017 19:57
Mass spectrometry dictionary
monoisotopicMassTable = {
'A': 71.03711,
'C': 103.00919,
'D': 115.02694,
'E': 129.04259,
'F': 147.06841,
'G': 57.02146,
'H': 137.05891,
'I': 113.08406,
'K': 128.09496,
@kpostekk
kpostekk / keys.txt
Last active November 28, 2017 14:44
Py4Speak vaule keys
virtualserver_unique_identifier
virtualserver_name
virtualserver_welcomemessage
virtualserver_platform
virtualserver_version
virtualserver_maxclients
virtualserver_password
virtualserver_clientsonline
virtualserver_channelsonline
virtualserver_created