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
| import re | |
| import sys | |
| def print_usage(): | |
| print("Usage: python3 ./ics-filter.py [file] [regex_filter]") | |
| n = len(sys.argv) | |
| if n < 2: | |
| print("No ics file provided") | |
| print_usage() |
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/sh | |
| N=`uname -n` | |
| yum check-update > /tmp/checkupdate.log | |
| if [[ $? == 100 ]]; then | |
| mail -s "New YUM updates available: $N" -r [email protected] [email protected] < /tmp/checkupdate.log | |
| fi |
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
| # cloudflare config | |
| map $http_cf_connecting_ip $connecting_ip { | |
| default $http_cf_connecting_ip; | |
| "" $remote_addr; | |
| } | |
| log_format versioned '[$upstream_group] $remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent"'; |
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
| # Bedrock docker-compose file | |
| version: '3' | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always | |
| environment: |
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
| FROM jetbrains/teamcity-agent | |
| RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -; \ | |
| apt-get install -y nodejs make build-essential gcc g++ php7.0 php7.0-cli; \ | |
| npm install -g bower gulp yarn; \ | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \ | |
| php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"; \ | |
| php composer-setup.php; \ | |
| php -r "unlink('composer-setup.php');"; \ | |
| mv composer.phar /usr/bin/composer |
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
| function play() { | |
| # Usage: play /path/to/video /path/to/sub audio_out | |
| # audio_out: hdmi(default) / local / both / alsa [:device] | |
| audio_out=$3 | |
| : ${audio_out:=alsa} | |
| iconv -f windows-1250 -t UTF-8 $2 -o /tmp/sub.srt | |
| omxplayer -r -p --adev=$audio_out $1 --subtitles=/tmp/sub.srt | |
| } |
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 ORG=<organization> \ | |
| && mkdir $ORG \ | |
| && cd $ORG \ | |
| && curl -u <username|username:token> -s https://api.github.com/orgs/$ORG/repos\?per_page\=200 \ | |
| | grep ssh_url \ | |
| | awk '{print $2}' \ | |
| | sed -e "s/\"//g" \ | |
| | sed -e "s/,//g" \ | |
| | xargs -I{} bash -c "git clone {} &" |
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
| { | |
| "workbench.colorTheme": "Sublime Material Theme - Dark", | |
| "workbench.colorCustomizations": { | |
| "statusBar.background": "#333" | |
| }, | |
| "workbench.editor.showIcons": true, | |
| "workbench.editor.enablePreview": true, | |
| "workbench.editor.closeOnFileDelete": true, | |
| "editor.rulers": [80, 90, 100], |
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
| sudo su | |
| apt-get install -y autoconf automake libtool nasm make pkg-config | |
| cd /tmp | |
| wget https://github.com/mozilla/mozjpeg/releases/download/v3.1/mozjpeg-3.1-release-source.tar.gz | |
| tar -xvf mozjpeg-3.1-release-source.tar.gz | |
| cd mozjpeg | |
| autoreconf -fiv | |
| mkdir build && cd build | |
| sh ../configure | |
| make install |
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
| ffmpeg_version='3.1.3' | |
| cd /tmp && \ | |
| wget http://ffmpeg.org/releases/ffmpeg-$ffmpeg_version.tar.bz2 && \ | |
| cd - && \ | |
| mkdir -p /tmp/src && \ | |
| cd /tmp/src && \ | |
| tar xvjf ../ffmpeg-$ffmpeg_version.tar.bz2 && \ | |
| cd - && \ | |
| cd /tmp/src/ffmpeg-$ffmpeg_version && \ | |
| echo "deb http://ftp.ro.debian.org/debian/ jessie non-free" >> /etc/apt/sources.list && \ |