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
using System.Text; | |
using System.Text.RegularExpressions; | |
using log4net.Appender; | |
using log4net.Core; | |
namespace RecruitmentTesting.Business.Repositories | |
{ | |
public class NHAppender : ForwardingAppender | |
{ | |
protected override void Append(LoggingEvent loggingEvent) |
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
^((?!text).)*$ |
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
// Vue.js configuration | |
/* | |
1. Create file vue.config.js and export 'publicPath' with the value of '/sub/path' with the syntax of module.exports = { ... } | |
2. Set the router 'base' property to the same value '/sub/path' used in vue.config.js | |
Obs.: The value of '/sub/path' MUST start with a '/' to avoid it being interpreted as a relative path | |
*/ | |
// Express.js server | |
const express = require('express') |
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
function wsc_hide_login($headers) { | |
$url = $_SERVER["REQUEST_URI"]; | |
if(strpos($url, "/wp-admin") !== false || strpos($url, "/wp-login.php") !== false) { | |
$method = $_SERVER["REQUEST_METHOD"]; | |
if($method !== "GET") return; | |
$user = wp_get_current_user(); | |
$isAdmin = sizeof(array_filter($user->roles, function($item) { | |
return $item === "administrator"; | |
})) > 0; | |
if(!$isAdmin) { |
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 | |
$temperature = $_REQUEST['temperature'] ?? 0; | |
if($temperature < 0 || $temperature > 100) { | |
$temperature = min(100, max(0, $temperature)); | |
} | |
// Business functions | |
function lerpInt($min = 0, $max = 1, $progress = 0) { | |
return (($max - $min) * $progress) + $min; | |
} | |
// Parameters |
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 | |
$method = $_SERVER['REQUEST_METHOD']; | |
$uploadedFile = false; | |
if($method == 'POST') { | |
$totalFiles = count($_FILES['file']['name']); | |
for ($i = 0; $i < $totalFiles; $i++) { | |
$fileData = $_FILES['file']; | |
$fileInfo = pathinfo($fileData['name'][$i]); | |
$currentUploadPath = wp_upload_dir(); | |
$uploadPath = $currentUploadPath['path']; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Handle History Mode and custom 404/500" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "vuejs: chrome", |
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
services.AddDbContext<Db>(x => x.UseInMemoryDatabase("Db")); |
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
gsettings set org.gnome.desktop.interface text-scaling-factor 0.9375 |
NewerOlder