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
/** | |
* Conserve aspect ratio of the orignal region. Useful when shrinking/enlarging | |
* images to fit into a certain area. | |
* | |
* @param {Number} srcWidth Source area width | |
* @param {Number} srcHeight Source area height | |
* @param {Number} maxWidth Fittable area maximum available width | |
* @param {Number} maxHeight Fittable area maximum available height | |
* @return {Object} { width, heigth } | |
* |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Management; | |
using System.Text; | |
namespace ConsoleApp1 | |
{ | |
public static class MonitorsInfo | |
{ |
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 Leaf.Core.Extensions.Net; | |
//using Leaf.Core.Patterns; | |
public class MailClient // : Singleton<MailClient> | |
{ | |
public static async Task SendAsync(string body, string subject = "Test Email") | |
{ | |
SmtpClient client = null; | |
MailMessage mail = null; |
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
public static string Sha256(string text) | |
{ | |
var sb = new StringBuilder(); | |
using (var hash = SHA256.Create()) | |
{ | |
var result = hash.ComputeHash(Encoding.UTF8.GetBytes(text)); | |
// ReSharper disable once ForCanBeConvertedToForeach | |
for (int i = 0; i < result.Length; i++) | |
sb.Append(result[i].ToString("x2")); | |
} |
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 | |
function pretty_phone($phone) { | |
if (!preg_match('/^(\+?)(\d)(\d{3})(\d{3})(\d{2})(\d{2})$/', $phone, $matches)) { | |
return 'invalid phone'; | |
} | |
$is_international = !empty($matches[0]) && $matches[0] === '+'; | |
$last_delimiter = $is_international ? '-' : ' '; | |
$delimeters = [' ', ' ', $last_delimiter, $last_delimiter]; |
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
/* Global font */ | |
.monaco-shell, .windows { | |
font-family: Tahoma, Arial, sans-serif !important; | |
--monaco-monospace-font: 'Terminus (TTF) for Windows', Consolas, 'Courier New', monospace !important; | |
} | |
/* Remove italic for selected file */ | |
.monaco-icon-label.italic>.monaco-icon-label-description-container>.label-description, .monaco-icon-label.italic>.monaco-icon-label-description-container>.label-name { | |
font-style: normal !important; | |
color: #c5b482; | |
} |
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
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "https://github.com/grandsilence/laravel-steam-auth" | |
} | |
], | |
"require": { | |
"invisnik/laravel-steam-auth": "dev-master", | |
} |
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
@echo off | |
set OPENSSL_CONF=%~dp0..\conf\openssl.cnf | |
..\bin\openssl req -x509 -sha256 -newkey rsa:2048 -nodes -days 5475 -keyout rootCA.key -out rootCA.crt -subj "/CN=OSPanel/" | |
..\bin\openssl req -newkey rsa:2048 -nodes -days 5475 -keyout server.key -out server.csr -subj "/CN=PhpStorm/" | |
..\bin\openssl x509 -req -sha256 -days 5475 -in server.csr -extfile v3.txt -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out server.crt | |
..\bin\openssl dhparam -out dhparam.pem 2048 |
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
https://steamcommunity.com/inventory/76561198180976409/440/2?l=english&count=5000 |
OlderNewer