This is zero lines JS game. Only CSS and HTML, without JS =)
A Pen by Anonasaurus Rex on CodePen.
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteBase /subfolder/ | |
RewriteCond %{REQUEST_URI} !^/subfolder | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([a-z]+)/$ $1.php | |
RewriteRule ^([a-z]+-?[a-z]+)/$ $1.php |
<?php | |
$string = "abcdefgh"; | |
$regex = "/^[a-z]+$/i"; | |
// Syntax is preg_match(regex, string, [, out_matches [, flags [, offset]]]); | |
if (preg_match($regex, $string)) { | |
printf("Pattern '%s' found in string '%s'\n", $regex, $string); | |
} else { | |
printf("No match found in string '%s'!\n", $string); | |
} | |
?> |
cat /etc/nginx/logs/access.log | awk '{print $1 " " $4 " " $5 " " $6 " " $7}' | grep 'url' |
#!/bin/sh | |
tmp_usage=$(df -h /tmp/ | tail -1 | awk '{print $4}' | awk -F "%" '{print $1}') | |
if [ $tmp_usage -gt 90 ]; then | |
echo "Your /tmp folder is $tmp_usage% full, please investigate" | mail -s "TMP folder on <server-id>" [email protected]; | |
fi |
<time datetime="<?php echo date('Y-m-d\Th:m:sO', strtotime($publishedDate)); ?>" ><?php echo date('l jS F Y', strtotime($publishedDate); ?></time> |
rsync -avz /path/to/local/sync/folder -e "ssh -i /path/to/ssh/key" ubuntu@ec2instance:/path/to/remote/sync/folder |
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import itertools | |
import requests | |
import json | |
characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' | |
password_length = 6 | |
gen = itertools.combinations_with_replacement(characters,password_length) |
find . -name '*.png' -exec basename {} \; | sort | uniq -u | wc -l |
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |
This is zero lines JS game. Only CSS and HTML, without JS =)
A Pen by Anonasaurus Rex on CodePen.