Guide info:
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 | |
if [[ -x $(which php) ]]; then | |
PHP_ICU_VERSION=$(php -r 'echo defined("INTL_ICU_VERSION") ? INTL_ICU_VERSION : "none";') | |
echo "PHP ICU version: $PHP_ICU_VERSION" | |
else | |
echo 'WARNING: PHP not installed' | |
PHP_ICU_VERSION=none | |
fi |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
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 <MapKit/MapKit.h> | |
@interface CustomAnnotationView : MKMarkerAnnotationView | |
- (id) initWithAnnotationWithImage:(id<MKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier annotationViewImage:(UIImage *)annotViewImage; | |
@end |
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 UIKit | |
import PlaygroundSupport | |
extension UIFont { | |
func cssStyle(selector: String, otherStyles styles: String = "") -> String { | |
return "\(selector){font-family:\(fontName);font-size:\(Int(pointSize));\(styles)}" | |
} | |
} | |
let text = "<span class=heading>Stackoverflow</span> is launched in 2008, it currently has 231,083 Swift questions out of 52,499,188 total." |
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
const fs = require('fs') | |
const {sync: globSync} = require('glob') | |
const filesize = require('filesize') | |
const Terser = require('terser') | |
const options = require(process.env.TERSER_CONFIG || './terserrc.json') | |
const getSize = (file) => { | |
const {size} = fs.statSync(file) | |
return filesize(size) | |
} |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const EntryList = require('./weback.entrylist'); | |
const IS_PROD = (process.env.NODE_ENV === 'prod') ? true : false; | |
/* output path */ | |
const OUT_DIR_ABS = path.resolve('./dist'); |
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
#!/bin/sh | |
sudo yum update -y | |
sudo amazon-linux-extras install nginx1 php7.4 -y | |
sudo yum clean metadata | |
sudo yum install git mariadb-server php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip} -y | |
# Back up existing config | |
sudo cp -R /etc/nginx /etc/nginx-backup | |
sudo chmod -R 777 /var/log | |
sudo chown -R ec2-user:ec2-user /usr/share/nginx/html | |
echo "<?php phpinfo(); ?>" > /usr/share/nginx/html/index.php |
The following is from scotthelme.co.uk
with Content Security Policy (CSP) enabled(and a browser that supports it(http://caniuse.com/#feat=contentsecuritypolicy), you can tell the browser that it can only download content from the domains you explicitly allow http://www.html5rocks.com/en/tutorials/security/content-security-policy/ https://www.owasp.org/index.php/Content_Security_Policy I need to change our application code so we can increase security by disabling 'unsafe-inline' 'unsafe-eval'
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
# CSP definition for Nginx which leverages $server_name | |
# Purpose: One CSP-Header for all vhosts | |
# Installation | |
# Include this into each server directive in the nginx.conf | |
# Note | |
# Check out the script to send a Google Analytics Event and Email upon CSP violation is triggered | |
# https://github.com/mikeg-de/CSP-Violation-Google-Analytics-Email |
OlderNewer