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
| function getCurrentESTDate() { | |
| const offset = '-5' | |
| const d = new Date(); | |
| const utc = d.getTime() + (d.getTimezoneOffset() * 60 * 1000); | |
| return new Date(utc + (60 * 60 * 1000 * offset)); | |
| } | |
| const currentDate = getCurrentESTDate(); |
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
| Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
| curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
| Install a bundle | |
| curl -u admin:admin -F action=install -F bundlestartlevel=20 -F | |
| bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles | |
| Build a bundle | |
| curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F | |
| descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd |
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
| #disable access directory, only allow access static resource | |
| RewriteRule ^(wp-content|wp-includes)/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|ico|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov|xml|ttf|woff|eot)$ - [NC,L] | |
| RewriteRule ^(wp-content|wp-includes) index.php [NC,L] |
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
| # 6G FIREWALL/BLACKLIST | |
| # @ https://perishablepress.com/6g/ | |
| # 6G:[QUERY STRINGS] | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{QUERY_STRING} (eval\() [NC,OR] | |
| RewriteCond %{QUERY_STRING} (127\.0\.0\.1) [NC,OR] | |
| RewriteCond %{QUERY_STRING} ([a-z0-9]{2000,}) [NC,OR] | |
| RewriteCond %{QUERY_STRING} (javascript:)(.*)(;) [NC,OR] |
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
| # security headers | |
| # add to .htaccess | |
| <IfModule mod_headers.c> | |
| Header always set Referrer-Policy "no-referrer-when-downgrade" | |
| Header set Strict-Transport-Security "max-age=31536000; includeSubDomains" | |
| Header set X-XSS-Protection "1; mode=block" | |
| Header always append X-Frame-Options SAMEORIGIN | |
| Header set X-Content-Type-Options nosniff | |
| Header set X-Permitted-Cross-Domain-Policies none | |
| </IfModule> |
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 | |
| # | |
| # chkconfig: 2345 55 25 | |
| # description: Openresty | |
| # processname: nginx | |
| # config: /usr/local/openresty/nginx/conf/nginx.conf | |
| # pidfile: /usr/local/openresty/nginx/logs/nginx.pid | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $local_fs $remote_fs $network $named $syslog $time |
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
| .done { | |
| opacity: 0.5; | |
| text-decoration: line-through; | |
| } |
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/sh | |
| # Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
| set -e | |
| # Must be a valid filename | |
| NAME=foo | |
| PIDFILE=/var/run/$NAME.pid | |
| #This is the command to be run, give the full pathname | |
| DAEMON=/usr/local/bin/bar |
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
| global | |
| tune.ssl.default-dh-param 1024 | |
| defaults | |
| timeout connect 10000ms | |
| timeout client 60000ms | |
| timeout server 60000ms | |
| frontend fe_http | |
| mode http |
NewerOlder