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 redis | |
COPY ./redis.conf /usr/local/etc/redis/redis.conf | |
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ] |
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
maxmemory-policy allkeys-lfu |
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 | |
import ( | |
"encoding/json" | |
"fmt" | |
"github.com/m7shapan/njson" | |
) | |
var jsonString string = ` |
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 | |
$numbers = [1, 4, 5, 10, 3, 2, 5, 8, 11]; | |
$isThereLower = 0; | |
$tmp = 0; | |
for ($i = 1; $i < count($numbers); $i++) { | |
if ($numbers[$i] < $numbers[$tmp]) { | |
$isThereLower++; |
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
import MySQLdb | |
import MySQLdb.cursors | |
sql_db = MySQLdb.connect(host="",user="",passwd="",db="",cursorclass=MySQLdb.cursors.DictCursor) | |
cursor = sql_db.cursor() | |
domainsCount = cursor.execute("SELECT * FROM domains where ...") | |
print cursor.fetchall() |
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
server { | |
index index.html index.php; | |
set $basepath "/mnt/7282B48E0BE626E0/www/html"; | |
set $domain $host; | |
# check one name domain for simple application | |
if ($domain ~ "^(.[^.]*)\.dev$") { | |
set $domain $1; | |
set $rootpath "${domain}/public"; |
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
$phpWord = new \PhpOffice\PhpWord\PhpWord(); | |
$section = $phpWord->addSection(); | |
$section->addImage( | |
'105067.jpg', | |
array( | |
'width' => 100, | |
'height' => 100, | |
'marginTop' => -1, |