This file contains 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
<?php | |
function number($str) { | |
$arr = str_split($str); | |
$sum = 0; | |
for ($i = count($arr) - 1; $i >= 0; $i--) { | |
$idx = ord(strtoupper($arr[$i])) - 64; | |
$sum += $idx * (26 ** (count($arr) - $i - 1)); | |
} |
This file contains 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
ip_addresses_*.txt |
This file contains 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
<?php | |
/** | |
* Результат: | |
* Тестовый текст с тегом 1, | |
* Итак, счётчик 2, 3 - 4 | |
* И ещё 5 | |
* 6 | |
*/ | |
$text = <<<TEXT |
This file contains 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 -i input.mp4 -vf scale=1280:-1 -c:v libx264 -preset slow -c:a copy output.mp4 |
This file contains 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 | |
// About chickens | |
// https://habr.com/ru/post/348066 | |
import ( | |
crand "crypto/rand" | |
"fmt" | |
"math" | |
"math/rand" |
This file contains 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 | |
echo "Test CS-fixer" | |
echo "" | |
docker exec container_name sudo -u www-data /var/www/html/vendor/bin/php-cs-fixer fix --dry-run | |
if [ $? -gt 0 ] | |
then | |
echo "" | |
echo "Found ugly code, not pushing" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 node:6-wheezy | |
RUN npm install -g gulp-cli && npm install -g @angular/cli | |
RUN mkdir /ng-app | |
VOLUME ["/ng-app"] | |
WORKDIR "/ng-app" | |
EXPOSE 4200 |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
import ConfigParser | |
from Crypto.Hash import SHA | |
from Crypto.PublicKey import RSA | |
from Crypto.Signature import PKCS1_v1_5 | |
from base64 import b64encode | |
config = ConfigParser.ConfigParser() |
NewerOlder