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 days=%1 | |
SET folder=C:\_FolderToClean_ | |
IF %days%.==. GOTO NoDaysEntered | |
FORFILES /P "%folder%" /D -%days% /C "cmd /c DEL /Q @path" | |
IF ERRORLEVEL 1 GOTO ForFilesError | |
GOTO 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
#Avidemux script (works with Avidemux v 2.7.1) | |
#Merges all the mp4 files of a folder to a "_merged.mkv" file in the same folder | |
ext="mp4" | |
inputFolder="" | |
currentItemIndex=0 | |
# | |
def loadOrAppend(filein): | |
if(currentItemIndex==1): |
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.Text.RegularExpressions; | |
namespace RegExTest | |
{ | |
static class MyExtensions | |
{ | |
public static void PrintMatch(this Regex re, string input) | |
{ |
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
#include <iostream> | |
#include <cstdint> | |
using namespace std; | |
template<int N, uint16_t P> | |
struct Pow | |
{ | |
static const uint64_t Result = N * Pow<N, P - 1>::Result; | |
}; |
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"?> | |
<configuration> | |
<configSections> | |
<!-- config sections --> | |
</configSections> | |
<system.net> | |
<defaultProxy enabled="true"> | |
<proxy usesystemdefault="true" proxyaddress="http://127.0.0.1:8888" bypassonlocal="false" /> | |
</defaultProxy> | |
</system.net> |
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; | |
namespace AutoMapperTest.CLI | |
{ | |
class PersonDTO | |
{ | |
public Guid? ID { get; set; } | |
public string Name { get; set; } | |
public int? Age { get; set; } | |
public string Description { get; set; } |
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
#generate a private key without a pass phrase and with default length | |
openssl genrsa -out private.key | |
#generate a private key without a pass phrase and with 4096-bit length | |
openssl genrsa -out private.key 4096 | |
#generate a private key with a pass phrase and with default length | |
openssl genrsa -des3 -out private.key | |
#generate a self-signed certificate using private.key as key and set validity to 365 days |
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.Net; | |
using System.Net.Sockets; | |
static class IPAddressExtensions | |
{ | |
public static bool IsInternal(this IPAddress address) | |
{ | |
if (address == null) | |
throw new ArgumentNullException(nameof(address)); |
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
namespace MyDbTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine(DBHelper.Greet("Frodo", "Baggins")); | |
} | |
} | |
} |
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
class EnumUtils | |
{ | |
public static T ConvertTo<T, S>(S source) | |
where T : struct | |
where S : struct | |
{ | |
if (!typeof(T).IsEnum) | |
throw new ArgumentException("T must be an enumerated type"); | |
if (!typeof(S).IsEnum) |
OlderNewer