Simplicity is prerequisite for reliability. --Edger Djikstra
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.Diagnostics; | |
namespace SimplestLoggerUtility | |
{ | |
public static class Logger | |
{ | |
public static void Success(string message) | |
{ | |
EventLog.WriteEntry(AppDomain.CurrentDomain.FriendlyName, message, EventLogEntryType.Information); |
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
Write-Host "SYSTEM_TEAMPROJECT: $ENV:SYSTEM_TEAMPROJECT" | |
Write-Host "SYSTEM_TEAMFOUNDATIONSERVERURI: $ENV:SYSTEM_TEAMFOUNDATIONSERVERURI" | |
Write-Host "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI: $ENV:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI" | |
Write-Host "SYSTEM_COLLECTIONID: $ENV:SYSTEM_COLLECTIONID" | |
Write-Host "SYSTEM_DEFAULTWORKINGDIRECTORY: $ENV:SYSTEM_DEFAULTWORKINGDIRECTORY" | |
Write-Host "BUILD_DEFINITIONNAME: $ENV:BUILD_DEFINITIONNAME" | |
Write-Host "BUILD_DEFINITIONVERSION: $ENV:BUILD_DEFINITIONVERSION" | |
Write-Host "BUILD_BUILDNUMBER: $ENV:BUILD_BUILDNUMBER" | |
Write-Host "BUILD_BUILDURI: $ENV:BUILD_BUILDURI" | |
Write-Host "BUILD_BUILDID: $ENV:BUILD_BUILDID" |
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
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 | |
/* | |
* Filename: SimpleAuth.php | |
* Version: 1.0 | |
* Author: Heiswayi Nrird | |
* Dscription: Simple PHP script to protect any PHP page using session | |
* Website: https://heiswayi.nrird.com | |
* | |
* HOW TO USE | |
* ========== |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Formalize CSS</title> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<h1> | |
Example of all form elements |
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 | |
// Configuration | |
$title = 'Internal Image Hosting Script'; | |
$filedir = 'up'; // uploaded image dir | |
$maxsize = 5242880; //max size in bytes | |
$allowedExts = array('png', 'jpg', 'jpeg', 'gif'); | |
$allowedMime = array('image/png', 'image/jpeg', 'image/pjpeg', 'image/gif'); | |
$baseurl = $_SERVER['HTTP_HOST'].dirname($_SERVER['REQUEST_URI']).'/'.$filedir; | |
function compressImage($source_url, $destination_url, $quality) { |
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 | |
/** | |
* File Manager Script | |
*/ | |
// Default language ('en' and other from 'filemanager-l10n.php') | |
$lang = 'en'; | |
// Auth with login/password (set true/false to enable/disable it) | |
$use_auth = 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
using System; | |
// it's required for reading/writing into the registry: | |
using Microsoft.Win32; | |
// and for the MessageBox function: | |
using System.Windows.Forms; | |
namespace Utility.ModifyRegistry | |
{ | |
public class ModifyRegistry | |
{ |
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
$Num = 5 | |
$Jobs = @() | |
ForEach ($Job in (1..$Num)) | |
{ $Jobs += Start-Job -ScriptBlock { | |
$Count = 1 | |
Do { | |
Write-Progress -Id 2 -Activity "Background Job" -Status $Count -PercentComplete 1 | |
$Count ++ | |
Start-Sleep -Seconds 4 |