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
string patt = @"^\d{2}:\d{2} (AM|PM)$"; |
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
internal class SpriteInfo | |
{ | |
public string Name { get; private set; } | |
public int X { get; private set; } | |
public int Y { get; private set; } | |
public int W { get; private set; } | |
public int H { get; private set; } | |
public SpriteInfo(string name, int x, int y, int w, int h) | |
{ |
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
string getUrl = "http://whatevatreva.kwom"; | |
string postData = String.Format("organization_id={0}&subscriber_firstname={1}", "313", "Treva"); | |
HttpWebRequest getRequest = (HttpWebRequest)WebRequest.Create(getUrl); | |
getRequest.Method = WebRequestMethods.Http.Post; | |
getRequest.ContentType = "application/x-www-form-urlencoded"; | |
byte[] byteArray = Encoding.ASCII.GetBytes(postData); | |
getRequest.ContentLength = byteArray.Length; | |
Stream newStream = getRequest.GetRequestStream(); | |
newStream.Write(byteArray, 0, byteArray.Length); |
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
// given enum | |
export enum DairyTypes { | |
Cheese = 1, | |
Milk = 2, | |
Eggs = 3 | |
} | |
// output 'Eggs' equivalent to c#'s DairyTypes.Eggs.ToString() | |
console.log(DairyTypes[DairyTypes.Eggs]) |
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
<asp:DropDownList ID="ddlCountryOrigin" runat="server"> | |
<asp:ListItem Selected="true">Select Country</asp:ListItem> | |
<asp:ListItem>United States</asp:ListItem> | |
<asp:ListItem>Afghanistan</asp:ListItem> | |
<asp:ListItem>Albania</asp:ListItem> | |
<asp:ListItem>Algeria</asp:ListItem> | |
<asp:ListItem>American Samoa</asp:ListItem> | |
<asp:ListItem>Andorra</asp:ListItem> | |
<asp:ListItem>Angola</asp:ListItem> | |
<asp:ListItem>Anguilla</asp:ListItem> |
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
[assembly: InternalsVisibleTo("Assembly.Name")] |
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
# from https://stackoverflow.com/a/26180529 | |
%windir%\system32\inetsrv\appcmd.exe set config /section:applicationPools /[name='APP_POOL_NAME'].processModel.identityType:SpecificUser /[name='APP_POOL_NAME'].processModel.userName:DOMAIN\USER_NAME /[name='APP_POOL_NAME'].processModel.password:PASSWORD |
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
mysql --protocol=tcp --host=localhost --user=username -p --port=3306 --default-character-set=utf8mb4 --comments --database=dbname < "/path/import.sql" |
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
UPDATE [aspnet_Membership] SET [Password]='qOvF8m8F2IcWMvfOBjJYHmfLABc=', [PasswordSalt]='OM5gu45RQuJ76itRvkSPFw==', | |
[IsApproved] = '1', [IsLockedOut] = '0' | |
WHERE UserId IN (SELECT UserId FROM dbo.aspnet_Users WHERE UserName = 'sitecore\Admin') |
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
#!/bin/bash | |
sudo add-apt-repository ppa:ondrej/apache2 | |
sudo apt-get update | |
sudo apt-get install apache2 mysql-server mysql-client php libapache2-mod-php7.0 php-mysql mailutils mysql-workbench | |
mysql -u root -p -e "CREATE DATABASE demo; CREATE USER 'demo'@'localhost' IDENTIFIED BY 'passwordgoeshere'; GRANT ALL PRIVILEGES ON demo.* to 'demo' IDENTIFIED BY 'passwordgoeshere'; FLUSH PRIVILEGES;" | |
sudo adduser www-data www-data | |
sudo chown -R www-data:www-data /var/www |
NewerOlder