Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Novikov stranger777

View GitHub Profile
View fibonacci_1000000.txt
1953282128707757731632014947596256332443542996591873396953405194571625257887015694766641987634150146128879524335220236084625510912019560233744015438115196636156919962125642894303370113827800638002767411527927466669865578379318822832061271497583230334854893489572599230722912901928209264331627521730861460017912582042699659936020959339202005184862028402447343139811367418720203868480175318538621112878108240617741383293554561687606454065125954718029126547942894036981659206361019359291352135410376799082940320155702716115395031975973247782162957631629653356694777663285062345245593460647575025935813443457816767646258788590113727299073729478511448089572456191503507025589529116868550008802013233458747217794781447546792016090170642585629359747546532757575740077432034913428785189795354304734560307765078938767286539166799232817449361991523768149557632085371047859706188438731530582395627560879063107819004975169594709736713891745704555202135123350794403360712030504144685221041565037321067932275625864751191461141736034968121
View maze.py
from PIL import Image, ImageDraw
images = []
a = [
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0 ,0, 0, 0, 1, 0, 1, 1, 1, 1],
[1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0 ,0, 0, 0, 1, 0, 0, 0, 0, 0],
View bitrix_installer_fragment.php
<?php
interface iUserLocaleInstallerSettings
{
public function getInstallationSiteURL();
}
class RussianInstallation implements iUserLocaleInstallerSettings
{
public function getInstallationSiteURL()
@stranger777
stranger777 / nginx_centos68_src_installation.sh
Last active Dec 6, 2016
Install nginx from sources on CentOS 6.8
View nginx_centos68_src_installation.sh
#!/bin/bash
set -x
getfilenamebypath () {
echo "$1" | gawk -F/ '{print $NF}'
}
getpathbyfilename () {
local fullpath; fullpath="$1"
@stranger777
stranger777 / datediff.sh
Last active Aug 12, 2020
Simplest calculator two dates difference. By default in days
View datediff.sh
#!/bin/bash
#Simplest calculator two dates difference. By default in days
# Usage:
# ./datediff.sh first_date second_date [-(s|m|h|d) | --(seconds|minutes|hours|days)]
first_date=$(date -d "$1" "+%s")
second_date=$(date -d "$2" "+%s")
case "$3" in