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 ubuntu:16.04 | |
RUN apt-key adv --keyserver pool.sks-keyservers.net --recv-key 67D7ADA8 | |
RUN apt-get update && apt-get install -y wget | |
RUN apt-get install -y apt-transport-https ca-certificates | |
RUN wget -O /etc/apt/sources.list.d/pcoip.list https://downloads.teradici.com/ubuntu/pcoip-dev.repo | |
RUN apt-get update | |
RUN apt-get install -y pcoip-client libqt5x11extras5 strace | |
RUN export uid=1000 gid=1000 && \ | |
mkdir -p /etc/sudoers.d/ && \ | |
mkdir -p /home/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
#!/bin/bash | |
sudo apt -y install checkinstall libhdf4-dev libhdf5-dev | |
wget https://support.hdfgroup.org/ftp/HDF5/h4toh5/src/h4h5tools-2.2.3.tar.bz2 | |
tar -xf h4h5tools-2.2.3.tar.bz2 | |
cd h4h5tools-2.2.3 | |
for f in $(rgrep -l 'include "hfile.h"' .); do sed -i 's/"hfile.h"/<hfile.h>/' $f; done | |
for f in $(rgrep -l 'include "mfhdf.h"' .); do sed -i 's/"mfhdf.h"/<mfhdf.h>/' $f; done | |
for f in $(rgrep -l 'include "hdf.h"' .); do sed -i 's/"hdf.h"/<hdf.h>/' $f; done | |
CFLAGS='-lmfhdf -ldf -I/usr/include/hdf' ./configure --with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial | |
make |
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 x in $(ls -1 *JPG); do mv -i $x IMG_$(exif $x | grep Date | head -1 | awk '{ print $4"_"$5 }' | sed 's/[|:]//g').jpg; 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
#!/usr/bin/python | |
from scipy.fftpack import rfft, irfft | |
from scipy import array | |
import struct | |
from sys import argv | |
if len(argv) < 2: | |
print "Usage: ./encode.py SOURCEFILE" | |
exit() |
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
mkdir world; cd world | |
for PKG in `aptitude search ~i | awk '{ print $3; }'`; do | |
apt-get source $PKG | |
PKGDIR=`find . -maxdepth 1 -mindepth 1 -type d` | |
cd $PKGDIR | |
MISSINGDEPS=`cat debian/control | grep Build-Depends | sed 's/,//g' | sed 's/([^)]*)//g' | sed 's/\[[^][]*\]//g' | sed 's/Build-Depends\://'` | |
aptitude -y install $MISSINGDEPS | |
dpkg-buildpackage | |
cd .. | |
dpkg -i *.deb |
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
This small program was written for a friend who had to fax papers granting access to a factory's | |
territory to automobiles and persons mentioned in his SMS messages of a specific format. | |
Don't ask why :) | |
The format of SMS for a car: | |
@<COMTUBE_ACCOUNT> car DD.MM.YY, марка, номер [, driver name, arrival HH:MM, departure HH:MM] | |
The format of SMS for a group of people: | |
@<COMTUBE_ACCOUNT> fio DD.MM.YY, Name 1 [, Name 2 .. Name 8] |
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 | |
import io | |
dev = "/dev/ttyUSB1" # Replace this if necessary | |
cmd,data = io.open(dev, "w"), io.open(dev, "r") | |
cmd.write(u"AT+CPBR=?\n") | |
min_id, max_id = -1, -1 |