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
var RegionCodeISO31662ToFIPS = map[string]string{ | |
// From Maxmind's list. | |
"AD-2": "02", | |
"AD-3": "03", | |
"AD-4": "04", | |
"AD-5": "05", | |
"AD-6": "06", | |
"AD-7": "07", | |
"AD-8": "08", |
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 alias code=\'/c/Windows/System32/cmd.exe //C code \$\*\' > ~/.bash_profile |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
const string modelBase64 = @"H4sIAAAAAAAEAOy92XIcObIo+D5m8w8yPc1M99Fa1d2nrWqucZPEalJiMylVnycamAlmxlFkRHYslFjX7pfNw3zS/MIAiA2BfYvISCqszFjKgLsDcPgGx/b//T//7y//4/s2fvYAszxKk1+fv37x6vkzmCzTVZSsf31eFvf/8bfn/+P//t//t1/OVtvvz740cG8xHMJM8l+fb4pi9/eXL/PlBm5B/mIbLbM0T++LF8t0+xKs0pdvXr36z5evX7+EiMRzROvZs1+uy6SItpD8QD9P0mQJd0UJ4st0BeO8/o5KFoTqs49gC/MdWMJfn78D8TJNXpwhAsXj82dHcQRQIxYwvn/+DCRJWoACNfHvn3O4KLI0WS926AOIbx53EMHdgziHddP/3oGb9uLVG9yLlx1iQ2pZ5kW6tST4+m3NlpcsuhNzn7dsQ4yr+IN7TZj36/OTdLstE8Iztra/n8QZhmSYi/63She/L160qH9+1gP4cysQSG7wf39+dlLGRZnBXxNYFhmI//zsqryLo+U/4ONN+hUmv67uf/r57uf71fLu7d/u/3q3otuMWo3geh/Qp6ss3cGseLyG92xPzlfPn73sE3jJUmjxRchVp5GcIGl//uwSfL+AybrYID34y/Nn76LvcNV8qOXmcxIh3UA4RVainx/LOAZ3MWzLX2rqThBTlkWahahcV1fdT/xTUdlffgpQ2Xl+lmA+tL06TtMYgsSaQ+dJjn6dggLeRF2zu9+W5D7vVgg1GLnrNI4/lts7mLEMxQaszDJkOR8vCdcIS3uMfvvGhdEfwUO0JkoqG99LiBuUP392DWMCmG+iXWUQXzBAt5QNeJelW9QfnlIHdHsDsjUsUF9THeQiLbOlVesbTVC3+5YGFDSZKm/bwLWWBmq6RDf0l5edsTQzo |
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
declare @binaryContent varbinary(max); | |
select @binaryContent = Model | |
from [dbo].[__MigrationHistory] | |
where migrationId = '201810100357043_Name' | |
select cast('' as xml).value('xs:base64Binary(sql:variable("@binaryContent"))', | |
'varchar(max)') as base64Content |
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
ALTER DATABASE [DB_NAME] | |
SET SINGLE_USER WITH ROLLBACK IMMEDIATE | |
GO | |
sp_rename 'DB_NAME', 'DB_NAME_NEW' ,'DATABASE'; | |
GO | |
ALTER DATABASE [DB_NAME_NEW] | |
SET MULTI_USER | |
GO |
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
I created this regex: | |
\n*^\d+\n\n\d+:\d+:\d+,*\d+ --> \d+:\d+:\d+,\d+\n\n |
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
To Set Proxy in Ubuntu: | |
Edit the /etc/apt/apt.conf file under root and add the following: | |
Acquire::http::proxy "http://ProxyHOST:ProxyPORT/"; | |
Acquire::https::proxy "https://ProxyHOST:ProxyPORT/"; | |
sudo gedit ~/.condarc | |
proxy_servers: | |
http: http://ProxyHOST:ProxyPORT |
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
$("#selectOrigin").val("KIX").trigger("change"); | |
$("#selectDestination").val("HAN").trigger("change"); | |
$("#ctl00_UcRightV31_TxtDepartDate").val("27/11/2018"); | |
$("#ctl00_UcRightV31_TxtReturnDate").val("29/11/2018"); | |
$("#ctl00_UcRightV31_CbbCurrency_TextBox").val("JPY"); | |
$("#ctl00_UcRightV31_BtSearch").trigger("click"); |
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 file_get_contents_chunked($file, $chunk_size, $args, $callback) { | |
try { | |
$handle = fopen($file, "r"); | |
$i = 0; | |
while (!feof($handle)) | |
{ | |
call_user_func_array($callback,array(fread($handle,$chunk_size),&$handle,$i, $args)); | |
$i++; | |
} |
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
Imports System.Reflection | |
Namespace Base | |
Public MustInherit Class SingletonBase(Of T As SingletonBase(Of T)) | |
Private Shared ReadOnly _instance As Lazy(Of T) | |
Public Shared ReadOnly Property Instance() As T | |
Get | |
Return _instance.Value | |
End Get |