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
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| "strconv" | |
| "strings" | |
| "sync" | |
| "time" | |
| ) |
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:14.04 | |
| MAINTAINER Jan Issac <[email protected]> | |
| # Use noninteractive debconf frontend | |
| ENV DEBIAN_FRONTEND noninteractive | |
| # Update | |
| Run apt-get update |
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 | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 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
| # -*- coding: utf-8 -*- | |
| """ | |
| Нахождение наибольшей общей подпоследовательности (Longest Common Subsequence) | |
| Реализации алгоритма LCS | |
| https://en.wikipedia.org/wiki/Longest_common_subsequence_problem | |
| """ | |
| s = [] | |
| a = 'nematode knowledge' | |
| b = 'empty bottle' | |
| m = len(a) |
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
| var canvas = document.createElement('canvas'); | |
| var ctx = canvas.getContext('2d'); | |
| // https://www.browserleaks.com/canvas#how-does-it-work | |
| var txt = 'http://valve.github.io'; | |
| ctx.textBaseline = "top"; | |
| ctx.font = "14px 'Arial'"; | |
| ctx.textBaseline = "alphabetic"; | |
| ctx.fillStyle = "#f60"; | |
| ctx.fillRect(125,1,62,20); | |
| ctx.fillStyle = "#069"; |
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 -xv | |
| # set -v Командная оболочка печатает входные строки сразу, как они считываются. | |
| # set -x Перед исполнением команды выдаются трассировочные данные. | |
| # Можно отображать отладочную информацию только там, где укажете | |
| set -x # activate debugging from here | |
| echo "debug me" | |
| set +x # stop debugging from here | |
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
| # Устанавливаем поддержку шрифтов Windows | |
| sudo apt-get install ttf-mscorefonts-installer | |
| # Создаем папку где у нас будут храниться шрифты пользователя | |
| mkdir ~/.fonts | |
| # Копируем нужные шрифты в ранее созданную папку | |
| # Обновляем информацию о шрифтах | |
| sudo fc-cache -f -v |