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
ab_name = "ab.txt" | |
cipher_name = "cipher.txt" | |
output_name = "output.txt" | |
import sys | |
if (len(sys.argv) < 2): | |
print("Error: too few arguments") | |
exit(0) |
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
#! /usr/bin/ruby | |
# @ubuntu: depends on ffmpeg, libavcodec-extra-53 | |
output_dir = "output" | |
if File.exists? output_dir | |
id = 1 | |
while File.exists?(output_dir + id.to_s) && id < 10 | |
id += 1 |
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 | |
# create session for round | |
if [ -z "$1" ]; then | |
echo "Round name is missing" | |
exit 1 | |
fi | |
mkdir $1 |
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
#! /usr/bin/python | |
############################################################################### | |
# Script converts an arbitrary picture into a single frame, | |
# compliant with ITU-R BT.656-5, see: | |
# | |
# http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.656-5-200712-I!!PDF-E.pdf | |
# | |
# Tested on Ubuntu 12.04, Python 2.7.3 | |
############################################################################### |
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
#! /usr/bin/python | |
############################################################################### | |
# Script converts a single frame, compliant with ITU-R BT.656-5, | |
# into a picture of given format (like PNG, JPEG, BMP, etc) | |
# | |
# Tested with Python 2.7.5, Pillow 2.7 | |
############################################################################### | |
from PIL import Image |
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
# It's useful, if you got warnings like this in SailfishOS SDK validation tool: | |
# WARNING [/usr/share/icons/hicolor/86x86/apps/harbour-<app>.png] File must not be executable (current permissions: 755) | |
... | |
%files | |
%defattr(755,root,root,-) | |
%{_bindir} | |
%defattr(644,root,root,-) | |
%{_datadir}/applications/%{name}.desktop | |
%{_datadir}/%{name} | |
%{_datadir}/icons/hicolor/86x86/apps/%{name}.png |
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
#! /usr/bin/env python3 | |
import argparse | |
import youtube_dl | |
class MyLogger(object): | |
def debug(self, msg): | |
pass |
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 | |
set -xe | |
export NEW_USER=murat | |
export GITHUB_LOGIN=mxwell | |
export HOST_NAME=REMOTE | |
export NEW_HOME=/home/$NEW_USER | |
sudo useradd -s "/bin/bash" $NEW_USER |
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
#! /usr/bin/env python3 | |
""" | |
AutoCAD SheetSet file with *.dst extension is just an XML stream encoded with substitution cipher. | |
XML data is firstly encoded with UTF-8. This means characters might have different length (from one to four bytes). | |
It looks like substitution needs to be done on a per-character level rather than per-byte level. | |
== Restore conversion dictionary == | |
Given two files "Crack.xml" and "Crack.dst", we can restore conversion dictionary (limited to charset used in these files) as follows: |
OlderNewer