A Pen by Fabien Dehopré on CodePen.
This code comes from egghead.io
{ | |
"extends": ["tslint:latest", "tslint-config-prettier"], | |
"rulesDirectory": ["codelyzer", "rxjs-tslint"], | |
"rules": { | |
"member-access": [true, "no-public"], | |
"member-ordering": [ | |
true, | |
{ | |
"order": ["static-field", "instance-field", "static-method", "instance-method"] | |
} |
#!/bin/bash | |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y curl | |
release=$(lsb_release -cs) | |
pkg_list=(git git-flow zsh zsh-doc openssh-server net-tools mc dotnet-sdk-2.1.105 nodejs yarn) | |
echo "Configuring APT repositories..." | |
if [[ $release == "trusty" ]] |
A Pen by Fabien Dehopré on CodePen.
This code comes from egghead.io
/* | |
(from Troy Hunt's article https://www.troyhunt.com/understanding-csp-the-video-tutorial-edition/) | |
1. Go to Google Chrome | |
2. Go to any website (works cool on facebook) | |
3. Right click anywhere -> Inspect Element | |
4. Click on the rightmost "Console" tab. | |
5. Copy paste the following * into the console. | |
6. Make sure the volume isn't too loud! | |
6. Press Enter. |
public static class IPAddressExtensions | |
{ | |
/// <summary> | |
/// Indicates whether the <see cref="IPAddress"/> is a routable address or not. | |
/// </summary> | |
/// <param name="ipAddress"></param> | |
/// <remarks>A null or empty string passed as the ipAddress will return true. An invalid ipAddress will be returned as true. </remarks> | |
/// <returns><c>true</c> if the <see cref="IPAddress"/> is a private (non-routable) address; <c>false</c> otherwise.</returns> | |
public static bool IsNonRoutableIpAddress(this IPAddress ipAddress) | |
{ |
using System; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
public static class IdentifierExtensions | |
{ | |
// definition of a valid C# identifier: http://msdn.microsoft.com/en-us/library/aa664670(v=vs.71).aspx | |
private const string FORMATTING_CHARACTER = @"\p{Cf}"; | |
private const string CONNECTING_CHARACTER = @"\p{Pc}"; | |
private const string DECIMAL_DIGIT_CHARACTER = @"\p{Nd}"; |