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 bash | |
mkdir dir links | |
touch dir/node-1 dir/node-2 dir/node-3 dir/node-4 dir/node-5 | |
ln dir/node-2 links/2_ | |
ln dir/node-3 links/3_ | |
ln dir/node-3 links/3__ |
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 bash | |
touch a aa aaa b bb bbb c cc ccc | |
echo "a" > aa | |
echo "a" > aaa | |
echo "bsdasdf" > bb | |
echo "bsdasdf" > bbb | |
echo "cccccc" > cc |
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 bash | |
touch a aa aaa b bb bbb c cc ccc | |
echo "a" > aa | |
echo "a" > aaa | |
echo "bsdasdf" > bb | |
echo "bsdasdf" > bbb | |
echo "cccccc" > cc |
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
#include <stdlib.h> | |
#include <dirent.h> | |
#include <utime.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <sys/sendfile.h> | |
#include <iostream> |
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 read($filename) { | |
$file = fopen($filename, 'r'); | |
while ($line = fgets($file)) { | |
yield $line; | |
} | |
} | |
$iterator = read(__FILE__); |
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 bash | |
# Install dependencies | |
yum update -y | |
yum install -y gcc apr-devel apr-util-devel openssl-devel pcre-devel libxml2-devel libcurl-devel | |
mkdir setup && cd setup | |
wget http://mirrors.besplatnyeprogrammy.ru/apache//httpd/httpd-2.4.4.tar.gz | |
tar -xvf httpd-2.4.4.tar.gz |
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
insert_port_forwarding() { #port, dest_ip, protocol, dest_port | |
local port=$1 | |
local dest_ip=$2 | |
local protocol=$3 | |
local dest_port=$4 | |
if [ -z $dest_port ] | |
then | |
dest_port=$port | |
fi | |
iptables -t nat -A PREROUTING -p $protocol -d $LIN_WAN_IP --dport $port -j DNAT --to $dest_ip:$dest_port |
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
// Line 271 | |
if (entity.fixedRotation === true) { | |
bodyDef.fixedRotation = true; | |
} else { | |
bodyDef.angularDamping = entity.angularDamping; | |
} |
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
<? | |
class Customer extends \yii\db\ActiveRecord | |
{ | |
public function getOrders() | |
{ | |
return $this->hasMany('Order', array('customer_id' => 'id')); | |
} | |
} | |
class Order extends \yii\db\ActiveRecord |
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
<VirtualHost *:80> | |
ServerName yii | |
DocumentRoot /home/boo1ean/test/public/ | |
<Directory /home/boo1ean/test/public/> | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> |