This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir cnv | |
for file in *.mp4; do | |
ffmpeg -i "$file" -vf "scale=trunc(iw*sar/2)*2:ih,setsar=1" "cnv/$file" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i = 0,RPD.Dungeon.level:getLength()-1 do --Проходим по всем клеткам карты | |
local maybeMob = RPD.Actor:findChar(i) --Есть ли кто? | |
if maybeMob and maybeMob ~= RPD.Dungeon.hero then --Есть и это не герой | |
RPD.Mob:makePet(maybeMob, RPD.Dungeon.hero) --Пробуем сделать из него питомца | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local storage = require "scripts/lib/storage" — подключаем библиотеку для работы с сейвами | |
local key = "ItemGiven" —id нашей записи о том что предмет выдан | |
if not storage.get(key) then —если предмет ещё не давали | |
local items = {"Dagger","RatHide"} — список предметов | |
local item = RPD.ItemFactory:itemByName(items[math.random(1,#items)]) — создаем предмет из списка | |
RPD.Dungeon.hero:collect(item) —даем предмет герою | |
storage.put(key,true) — запоминаем что дали предмет | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/bash | |
maxn=0 | |
for fn in /proc/*; do | |
if [ -e $fn/maps ] ; then | |
n=$(cat $fn/maps | wc -l) | |
if [ $n -gt $maxn ] ; then | |
maxn=$n | |
echo $fn "->" $n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select count(*), application_name from pg_stat_activity GROUP BY application_name,usename; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn propget svn:externals -R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NDK=d:/adt-bundle-windows-x86_64-20130917/android-ndk-r9 | |
export NDKABI=14 | |
export NDKVER=$NDK/toolchains/arm-linux-androideabi-4.8 | |
export NDKP=$NDKVER/prebuilt/windows-x86_64/bin/arm-linux-androideabi- | |
export NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm" | |
export NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8" | |
export NDK_MAKE=$NDK/prebuilt/windows-x86_64/bin/make.exe | |
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF $NDKARCH" TARGET_SYS="Linux" clean default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" -o -z "$2" ]; then | |
echo "Usage: substitute FROM_STRING TO_STRING [OPTION]..." | |
echo | |
echo "Replace all occurrences of FROM_STRING (a sed-compatible regular" | |
echo "expression) with TO_STRING in all files for which ack matches" | |
echo "FROM_STRING." | |
echo | |
echo "Any additional options are passed directly to ack (e.g.," |