Skip to content

Instantly share code, notes, and snippets.

View rewida17's full-sized avatar
💭
Hard working 😄

rewida17

💭
Hard working 😄
  • Poland
View GitHub Profile
@rewida17
rewida17 / download_podcast.sh
Created December 23, 2017 21:11 — forked from bluvertigo/download_podcast.sh
bash wget - check if file exists at url before downloading
#!/bin/bash
# simple function to check http response code before downloading a remote file
# example usage:
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi
function validate_url () {
if [[ `curl -s --head "$1" | head -n 1 | grep "HTTP/[1-3].[0-9] [23].."` ]]
then
# 0 = true
@rewida17
rewida17 / oggfix
Last active December 15, 2017 21:52
Skrypt naprawiający pliki ogg nie posiadające znacznika EOF / Simple bash script to fix ogg files w/o EOF stamp
#!/bin/bash
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <rewida17@gmail.com> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Dawid Pośpiech
# ----------------------------------------------------------------------------
GetTime=$(ffprobe -sexagesimal -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$1")
@rewida17
rewida17 / NDK_EXPORT
Last active December 9, 2017 02:03
android ndk export
export NDK=/opt/andndk/bin
#for nexus 4 (MAKO)
$target_host
armv7-none-linux-androideabi
export ADDR2line=arm-linux-androideabi-addr2line
export AS=arm-linux-androideabi-as
export CPP=arm-linux-androideabi-cpp
export DWP=arm-linux-androideabi-dwp
export ELFEDIT=arm-linux-androideabi-elfedit
export CXX=arm-linux-androideabi-g++
@rewida17
rewida17 / termux
Last active April 10, 2024 06:24
Run termux env via eg adb shell
#!/system/xbin/bash
#Based on https://github.com/termux/termux-app/issues/77
export PREFIX='/data/data/com.termux/files/usr'
export HOME='/data/data/com.termux/files/home'
export LD_LIBRARY_PATH='/data/data/com.termux/files/usr/lib'
export PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:$PATH"
export LANG='en_US.UTF-8'
export SHELL='/data/data/com.termux/files/usr/bin/bash'
export BIN='/data/data/com.termux/files/usr/bin'
export TERM=vt220
@rewida17
rewida17 / gifmake
Created November 30, 2017 10:45
FFMPEG GIF Create
#!/bin/bash
usage()
{
echo -e "\\nUsage:\\n ./gifmake \\n [Wejściowe Wideo] [Nazwa Końcowa Pliku GIF] [Roździelczość Pozioma] [(fps)] [czas początku( HH:MM:SS.MSS)] [czas końca (HH:MM:SS.MSS) ]"
}
if [[ ( $@ == "--help") || $@ == "-h" ]]
then
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" lang="pl">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<![endif]-->
<script type="text/javascript" src="//static.cda.pl/js/layout_pack/layout_pack_no_uplv3.js?v=203bcd"></script>
<script type="text/javascript" src="//static.cda.pl/js/jquery.cookie.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" lang="pl">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<![endif]-->
<script type="text/javascript" src="//static.cda.pl/js/layout_pack/layout_pack_no_uplv3.js?v=203bcd"></script>
<script type="text/javascript" src="//static.cda.pl/js/jquery.cookie.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" lang="pl">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<![endif]-->
<script type="text/javascript" src="//static.cda.pl/js/layout_pack/layout_pack_no_uplv3.js?v=203bcd"></script>
<script type="text/javascript" src="//static.cda.pl/js/jquery.cookie.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" lang="pl">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<![endif]-->
<script type="text/javascript" src="//static.cda.pl/js/layout_pack/layout_pack_no_uplv3.js?v=203bcd"></script>
<script type="text/javascript" src="//static.cda.pl/js/jquery.cookie.js"></script>