This file contains hidden or 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
/// <summary> | |
/// Splits a file into multiple files based on the specified chunk size of each file. | |
/// </summary> | |
/// <param name="file">The file.</param> | |
/// <param name="chunkSize">The maximum number of bytes to store in each file. | |
/// If a chunk size is not provided, files will be split into 1 MB chunks by default. | |
/// The breakOnNewlines parameter can slightly affect the size of each file.</param> | |
/// <param name="targetPath">The destination where the split files will be saved.</param> | |
/// <param name="deleteAfterSplit">if set to <c>true</c>, the original file is deleted after creating the newly split files.</param> | |
/// <param name="breakOnNewlines">if set to <c>true</c> break the file on the next newline once the chunk size limit is reached.</param> |
This file contains hidden or 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
/// <summary> | |
/// Gets the original file name from G-ZIP file. | |
/// </summary> | |
/// <returns>The decompressed file name.</returns> | |
private string GetFileNameFromGZipFile() | |
{ | |
var bytes = File.OpenRead("abc.dat.gz"); | |
bytes.ReadByte(); | |
bytes.ReadByte(); | |
var b = bytes.ReadByte(); |
This file contains hidden or 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
<staticContent lockAttributes="isDocFooterFileName"> | |
<mimeMap fileExtension=".323" mimeType="text/h323" /> | |
<mimeMap fileExtension=".aaf" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".aca" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".accdb" mimeType="application/msaccess" /> | |
<mimeMap fileExtension=".accde" mimeType="application/msaccess" /> | |
<mimeMap fileExtension=".accdt" mimeType="application/msaccess" /> | |
<mimeMap fileExtension=".acx" mimeType="application/internet-property-stream" /> | |
<mimeMap fileExtension=".afm" mimeType="application/octet-stream" /> | |
<mimeMap fileExtension=".ai" mimeType="application/postscript" /> |
This file contains hidden or 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 DatabaseName; | |
GO | |
DBCC CHECKIDENT ('TableName', RESEED, 1); | |
GO |
This file contains hidden or 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
/** | |
* Auto loads scripts and styles based on the page name if they exist. | |
*/ | |
function mytheme_bootstrap_page_resources() { | |
if( is_page_template() ) { | |
$page_template = basename( get_page_template(), '.php' ); | |
$css_file_path = get_stylesheet_directory() . "/css/templates/$page_template.css"; | |
$js_file_path = get_stylesheet_directory() . "/js/templates/$page_template.js"; | |
$css_file_uri = get_stylesheet_directory_uri() . "/css/templates/$page_template.css"; | |
$js_file_uri = get_stylesheet_directory_uri() . "/js/templates/$page_template.js"; |
This file contains hidden or 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
powercfg /hibernate off |
This file contains hidden or 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
# Eliminates requests to YouTube's Buffering CDN Locations | |
#Install | |
netsh advfirewall firewall add rule name="YoutubeBufferTrick" dir=in action=block remoteip=173.194.55.0/24,206.111.0.0/16,208.117.251.0/24 enable=yes | |
#Uninstall | |
netsh advfirewall firewall delete rule name="YoutubeBufferTrick" |