Skip to content

Instantly share code, notes, and snippets.

View x5f3759df's full-sized avatar

Denis Shkuratov x5f3759df

  • Game Forest Studio
  • Vladivostok
View GitHub Profile
@x5f3759df
x5f3759df / iraqcalc.py
Created April 9, 2020 07:50
IRAF flux and magnitude calculator
""" IRAF files analyzer """
import argparse
import configparser
import logging
import math
import sys
import os
try:
@x5f3759df
x5f3759df / mpv.conf
Last active November 16, 2016 20:18
# output
profile=opengl-hq
opengl-backend=dxinterop
vo=opengl
# scaling
scale=ewa_lanczossharp
cscale=ewa_lanczos #cscale=ewa_lanczossoft
dscale=mitchell
@x5f3759df
x5f3759df / vp9.bat
Last active February 7, 2016 09:21
vp9 webm bat file
@ECHO OFF
SET bitrate=1M
SET scale=960
ECHO start
ffmpeg -i "%~1" -map_metadata -1 -vf scale=-1:%scale% -sn -c:v vp9 -tile-columns 6 -frame-parallel 1 -b:v %bitrate% -crf 0 -an -threads 6 -speed 4 -pass 1 -f null -y NUL
ffmpeg -i "%~1" -map_metadata -1 -vf scale=-1:%scale% -sn -c:v vp9 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -b:v %bitrate% -crf 0 -c:a libopus -b:a 64k -threads 6 -speed 1 -pass 2 -f webm -y "%~dp0\%~n1"_VP9.webm
ECHO done
PAUSE
@x5f3759df
x5f3759df / .asoundrc
Created August 25, 2013 20:02
Sound configuration for using microphone from Realtek HDA and sound output from usb sound card. Also using alsa downmixing and input/output sharing.
# high quality resampling
defaults.pcm.rate_converter "samplerate_best"
# alsa fix to play many sounds
pcm.output {
type asym
playback.pcm {
type dmix
ipc_key 5678293
ipc_perm 0660
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_multisample, GLX_EXT_buffer_age,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
@x5f3759df
x5f3759df / gist:6073800
Created July 24, 2013 19:40
steam output with error
/tmp/dumps/crash_20130724205519_1.dmp
Game removed: AppID 570 "Dota 2", ProcID 389
/home/user/.local/share/Steam/SteamApps/common/dota 2 beta/dota.sh: line 67: 389 Segmentation fault (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!
Finished uploading minidump (out-of-process): success = yes
response: CrashID=bp-939b22a4-8f70-48a4-a665-e6ccf2130724
Installing breakpad exception handler for appid(steam)/version(1374006490_client)
Installing breakpad exception handler for appid(steam)/version(1374006490_client)
Installing breakpad exception handler for appid(steam)/version(1374006490_client)
/home/buildbot/buildslave_steam/steam_rel_client_ubuntu12_linux/build/src/clientdll/csinterface.cpp (107) : Assertion Failed: m_unRequestsOutstanding == 0
[38150.750125] dota_linux[389]: segfault at 0 ip b48b5d60 sp bf9f1d90 error 6 in libtier0.so[b4899000+3b000]
@x5f3759df
x5f3759df / gist:6073770
Last active December 20, 2015 04:49
lspci
$ lspci
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 02)
00:01.0 PCI bridge: Intel Corporation 4 Series Chipset PCI Express Root Port (rev 02)
00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
@x5f3759df
x5f3759df / main.c
Created January 29, 2013 14:47
Simple images grabber for imageboards. Written in C. Uses pcre and libcurl. Usage: grabber [URL]
#include <stdio.h>
#include <string.h>
#include <pcre.h>
#include <curl/curl.h>
#define USER_AGENT "Mozilla/5.0 (Windows NT 6.1; rv:18.0) Gecko/20100101 Firefox/18.0"
struct MemoryStruct {
char *memory;