I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
<?php | |
/** | |
* Abstract class that serves as the Model in the MVC framework. | |
* | |
* A Model is a representation of the information in the application. A Model's | |
* data is saved in the database and the class is used to handle all the | |
* business logics. This class handles the standard create, read, update | |
* and delete operations. It must be extended to create the concrete | |
* implementation of a Model, and handle any other business logics specific to |
var colorArray = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6', | |
'#E6B333', '#3366E6', '#999966', '#99FF99', '#B34D4D', | |
'#80B300', '#809900', '#E6B3B3', '#6680B3', '#66991A', | |
'#FF99E6', '#CCFF1A', '#FF1A66', '#E6331A', '#33FFCC', | |
'#66994D', '#B366CC', '#4D8000', '#B33300', '#CC80CC', | |
'#66664D', '#991AFF', '#E666FF', '#4DB3FF', '#1AB399', | |
'#E666B3', '#33991A', '#CC9999', '#B3B31A', '#00E680', | |
'#4D8066', '#809980', '#E6FF80', '#1AFF33', '#999933', | |
'#FF3380', '#CCCC00', '#66E64D', '#4D80CC', '#9900B3', | |
'#E64D66', '#4DB380', '#FF4D4D', '#99E6E6', '#6666FF']; |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
from OpenSSL.crypto import load_certificate, FILETYPE_PEM | |
cert_file_string = open("esx.crt", "rb").read() | |
cert = load_certificate(FILETYPE_PEM, cert_file_string) | |
sha1_fingerprint = cert.digest("sha1") | |
print sha1_fingerprint |
Starting with Android Nougat, Google changed the way apps handle user certificates:
Apps that target API Level 24 and above no longer trust user or admin-added CAs for secure connections, by default.
This means that certificates issued by applications like [Charles][charles] or [mitmproxy][mitmproxy] are no longer accepted, so these proxies won't work for HTTPS traffic.
This tutorial explains what needs to be done to overcome that restriction and be able to sniff any Android app's HTTPS requests.
// https://github.com/arhs/iban.js | |
(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
// AMD. Register as an anonymous module. | |
define(['exports'], factory); | |
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { | |
// CommonJS | |
factory(exports); | |
} else { | |
// Browser globals |
/// lib/utilities/assets.dart | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
/// Usage: | |
/// | |
/// The image file is located at lib/assets/images/path/to/image.png. | |
/// | |
/// 1. Image has no dark mode variant. |
using System; | |
using System.Data; | |
using System.Collections.Generic; | |
public class TableSchema { | |
private Dictionary<string, TableSchemaColumn> columns; | |
public TableSchema(DataTable dataTable) { | |
this.columns = new Dictionary<string, TableSchemaColumn>(); |
import { test as base } from '@playwright/test'; | |
const setFakeTime = async (dateTime: string, page: Page): Promise<void> => { | |
const fakeNow = new Date(dateTime).valueOf(); | |
const setFakeTime = async (dateTime: string, page: Page): Promise<void> => { | |
const fakeNow = new Date(dateTime).valueOf(); | |
await page.addInitScript(`{ | |
// Extend Date constructor to default to fakeNow | |
Date = class extends Date { | |
constructor(...args) { |