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
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define NUM_THREADS 10 | |
void *PrintHello(void *threadid) { | |
long tid; | |
tid = (long) threadid; |
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
<?php | |
require_once 'HastTable.php'; | |
const LENGTH = 20; | |
$hs1 = generate(); | |
var_dump($hs1); | |
$hs1->bucketSort(); | |
var_dump($hs1); | |
echo str_repeat('=', 150) . PHP_EOL; |
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
<?php | |
class HastTable implements ArrayAccess | |
{ | |
private $storage = []; | |
private $hashFunc; | |
public function __construct(callable $hashFunction) | |
{ | |
$this->hashFunc = $hashFunction; |
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
<?php | |
require_once 'HastTable.php'; | |
const LENGTH = 150; | |
$length = LENGTH; | |
$division = function ($key) { | |
return $key % LENGTH; |
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 | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
apt-get install pkg-config libmagickwand-dev -y | |
cd /tmp | |
wget https://pecl.php.net/get/imagick-3.4.0.tgz | |
tar xvzf imagick-3.4.0.tgz |
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 | |
changed_files="$(git log --name-status HEAD^..HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "composer.lock" && composer --working-dir=$GIT_WORK_TREE install | |
} | |
# `composer install` if the `composer.lock` file gets changed |
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
/* | |
* Copyright (C) 2006, 2008 Valery Kholodkov | |
* Client body reception code Copyright (c) 2002-2007 Igor Sysoev | |
* Temporary file name generation code Copyright (c) 2002-2007 Igor Sysoev | |
*/ | |
#include <ngx_config.h> | |
#include <ngx_core.h> | |
#include <ngx_http.h> | |
#include <nginx.h> |
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
<!DOCTYPE html> | |
<html id="day"> | |
<head> | |
<script type="text/javascript">(function(){ | |
var | |
d=(new Date({$time}*1000)).getHours(); | |
document.documentElement.id=d>=23||d<9?"night":"day"; | |
})();</script> | |
<meta charset="utf-8"/> | |
<title>box.unet.by</title> |
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
<div id="unet-help"> | |
<div id="unet-help-body"> | |
<table> | |
<tr> | |
<td> | |
<div id="unet-help-sidebar"> | |
{if $gid != 10} | |
<div class="unet-help-sidebar-unit"> | |
<dl> | |
<dt>Настройка интернета</dt> |
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
server { | |
server_name www.adminer.dev.unet.by; | |
return 301 $scheme://adminer.dev.unet.by$request_uri; | |
} | |
server { | |
server_name adminer.dev.unet.by; | |
root /home/www/adminer; | |
index index.php; | |
location / { |