When testing Cocoa data detector I found that forecast.io isn't picked up but www.forecast.io and forecast.com are.
What are all the top level domains found by NSDataDetector without prefixing them with www.?
I wrote about how to pick an Apple friendly TLD and my findings are recounted below.
I just took the text file from ICANN and prepended all the extensions with 'example.' and the only ones detected at least in my locale(US) were these:
Uppercase:
example.com
example.EDU
example.EU
example.GOV
example.LY
example.NET
example.ORG
Lowercase:
example.ar
example.at
example.au
example.be
example.br
example.ca
example.ch
example.cn
example.de
example.dk
example.edu
example.es
example.eu
example.fi
example.fr
example.gov
example.gr
example.hk
example.hu
example.il
example.is
example.it
example.jp
example.kr
example.lu
example.ly
example.ma
example.mx
example.net
example.nl
example.no
example.nz
example.org
example.pt
example.ru
example.se
example.sg
example.th
example.tn
example.tr
example.tw
example.ua
example.uk
example.us
From my own testing, it looks like anything with www. on the front will be detected.
As an update to Steve's answer, here are the lowercased tld's that were detected for me, as of Nov 1, 2016:
example.ar
example.at
example.au
example.cc
example.ch
example.cn
example.co
example.com
example.de
example.dk
example.edu
example.es
example.eu
example.fi
example.fm
example.fr
example.gov
example.gr
example.hk
example.hr
example.hu
example.ie
example.il
example.info
example.io
example.is
example.it
example.kr
example.lu
example.ly
example.ma
example.me
example.mx
example.net
example.nl
example.no
example.nz
example.org
example.pt
example.pw
example.rs
example.ru
example.se
example.sg
example.si
example.th
example.tn
example.tr
example.tw
example.ua
example.uk
example.us
Related
I am new to this and I want to parse the following log for a checkpoint firewall, I don't know if you can help me or guide me how I can do it so that I can see separate fields and not a single text
Ejemplo:
Source: -5:00
IP: XXX.XXX.XXX.XXX
Action: Accept
UUID= XXXX
....
-5:00 192.168.1.2 Action="accept" UUid="{0x61b22d19,0x4,0xf1137d7f,0xc0000000}" inzone="Internal" outzone="Internal" src="10.207.104.247" dst="10.207.106.9" proto="6" xlatesrc="186.5.16.83" NAT_rulenum="14" NAT_addtnl_rulenum="1" rule="21 (Incoming/Internal)" product="VPN-1 & FireWall-1" service="10050" s_port="38930
%{NUMBER}:00 %{IP} Action=%{QS} UUid=%{QS} inzone=%{QS} outzone=%{QS} src=%{QS} dst=%{QS} proto=%{QS} xlatesrc=%{QS} NAT_rulenum=%{QS} NAT_addtnl_rulenum=%{QS} rule=%{QS} product=%{QS} service=%{QS} s_port=%{QS}
I am trying the next grok but I am not getting what I want.
In the example you provided, a " is missing at the end, otherwise your grok pattern works for me.
You can add name to the fields so you can easily get them in graylog, for example:
%{NUMBER}:00 %{IP:ip} Action=%{QS:action} UUid=%{QS:uuid} inzone=%{QS:inzone} outzone=%{QS:outzone} src=%{QS:src} dst=%{QS:dst} proto=%{QS:proto} xlatesrc=%{QS:xlatesrc} NAT_rulenum=%{QS:natrulenum} NAT_addtnl_rulenum=%{QS:nataddtnlrulenum} rule=%{QS:rule} product=%{QS:product} service=%{QS:service} s_port=%{QS:sport}
I have VS2017 installed and I am connecting to VSTS online.
The Output window (Show output from Source Control - Team Foundation) is filling up with Illegal characters in path. output.
I don't know why. I have seen this appear a few times on other projects but never investigated why. Today I had a chance to catch the problem.
The structure of the project is as follows:
FullStackAspNetCore\.editorconfig
FullStackAspNetCore\database
FullStackAspNetCore\docs
FullStackAspNetCore\Files.txt
FullStackAspNetCore\FullStackAspNetCore.sln
FullStackAspNetCore\FullStackAspNetCore.vssscc
FullStackAspNetCore\src
FullStackAspNetCore\test
FullStackAspNetCore\.vs\config
FullStackAspNetCore\.vs\FullStackAspNetCore
FullStackAspNetCore\.vs\config\applicationhost.config
FullStackAspNetCore\.vs\FullStackAspNetCore\v15
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.dbmdl
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.sqlproj
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.sqlproj.user
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Acme.FullStack.SqlServerDB.sqlproj.vspscc
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Import Schema Logs
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\scripts
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Release
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug\Acme.FullStack.SqlServerDB.dacpac
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug\Acme.FullStack.SqlServerDB.dll
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\bin\Debug\Acme.FullStack.SqlServerDB.pdb
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables\ApplicationRoles.sql
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables\ApplicationUsers.sql
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\dbo\Tables\__EFMigrationsHistory.sql
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\Import Schema Logs\Acme.FullStack.SqlSe_20170629095103.log
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug\Acme.FullStack.SqlServerDB.dll
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug\Acme.FullStack.SqlServerDB.pdb
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\obj\Debug\Acme.FullStack.SqlServerDB.sqlproj.FileListAbsolute.txt
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\scripts\dev
FullStackAspNetCore\database\Acme.FullStack.SqlServerDB\scripts\dev\insert dev data.sql
FullStackAspNetCore\docs\Entity Framework.md
FullStackAspNetCore\src\Acme.FullStack.Data.EF
FullStackAspNetCore\src\Acme.FullStack.Data.Model
FullStackAspNetCore\src\Acme.FullStack.Web
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Acme.FullStack.Data.EF.csproj
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Acme.FullStack.Data.EF.csproj.vspscc
FullStackAspNetCore\src\Acme.FullStack.Data.EF\appsettings.json
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.deps.json
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.dll
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.dll
FullStackAspNetCore\src\Acme.FullStack.Data.EF\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts\ApplicationDbContext.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts\AuthenticationDbContext.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Contexts\AuthenticationDbContextFactory.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations\20170629093101_InitialCreate.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations\20170629093101_InitialCreate.Designer.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\Migrations\AuthenticationDbContextModelSnapshot.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Acme.FullStack.Data.EF.csproj.nuget.g.props
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Acme.FullStack.Data.EF.csproj.nuget.g.targets
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\project.assets.json
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.AssemblyInfo.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.csproj.FileListAbsolute.txt
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.csprojResolveAssemblyReference.cache
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.dll
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.EF.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\CoreCompileInputs.cache
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
FullStackAspNetCore\src\Acme.FullStack.Data.EF\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Acme.FullStack.Data.Model.csproj
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Acme.FullStack.Data.Model.csproj.vspscc
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Authentication
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Authentication\ApplicationRole.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\Authentication\ApplicationUser.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.deps.json
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.dll
FullStackAspNetCore\src\Acme.FullStack.Data.Model\bin\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Acme.FullStack.Data.Model.csproj.nuget.g.props
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Acme.FullStack.Data.Model.csproj.nuget.g.targets
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\project.assets.json
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.AssemblyInfo.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.csproj.FileListAbsolute.txt
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.csprojResolveAssemblyReference.cache
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.dll
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\Acme.FullStack.Data.Model.pdb
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\CoreCompileInputs.cache
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
FullStackAspNetCore\src\Acme.FullStack.Data.Model\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
FullStackAspNetCore\src\Acme.FullStack.Web\Acme.FullStack.Web.csproj
FullStackAspNetCore\src\Acme.FullStack.Web\Acme.FullStack.Web.csproj.vspscc
FullStackAspNetCore\src\Acme.FullStack.Web\bin
FullStackAspNetCore\src\Acme.FullStack.Web\obj
FullStackAspNetCore\src\Acme.FullStack.Web\Program.cs
FullStackAspNetCore\src\Acme.FullStack.Web\Properties
FullStackAspNetCore\src\Acme.FullStack.Web\Startup.cs
FullStackAspNetCore\src\Acme.FullStack.Web\wwwroot
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.deps.json
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.dll
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.pdb
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.runtimeconfig.dev.json
FullStackAspNetCore\src\Acme.FullStack.Web\bin\Debug\netcoreapp1.1\Acme.FullStack.Web.runtimeconfig.json
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Acme.FullStack.Web.csproj.nuget.g.props
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Acme.FullStack.Web.csproj.nuget.g.targets
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug
FullStackAspNetCore\src\Acme.FullStack.Web\obj\project.assets.json
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.AssemblyInfo.cs
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.csproj.FileListAbsolute.txt
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.csprojResolveAssemblyReference.cache
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.dll
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\Acme.FullStack.Web.pdb
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\CoreCompileInputs.cache
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
FullStackAspNetCore\src\Acme.FullStack.Web\obj\Debug\netcoreapp1.1\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
FullStackAspNetCore\src\Acme.FullStack.Web\Properties\launchSettings.json
Does anyone know where to look to start diagnosing this?
Quick & Dirty solution:
Focus on the output window, hit 'Esc'.
Other have pointed that disabling the "Source Control - Team Foundation" menu bar solves the issue.
https://developercommunity.visualstudio.com/content/problem/166821/illegal-characters-in-path-being-emitted-continuou.html
I am trying to connect a Google Docs extension to a MySQL database via JDBC Service. The MySQL database is running on a shared server that requires using CPanel. CPanel only lets me add one whitelist rule at a time, and I can only use the % wildcard character (which matches to 0 or more of any type of character). I wrote a script to generate rules in this format from the IP address ranges, but there are more than 300 of them. I'm trying to find an easier way to do this.
Is there a domain name for the Google JDBC Service that I can whitelist instead of the IP address ranges? Does CPanel have a more efficient whitelisting mechanism that I'm not aware of? Is there a program that could automate filling out CPanel's webform with my whitelist?
Here is the CPanel-formatted whitelist I generated, in case someone with the same problem finds my question.
64.18.0.%
64.18.1.%
64.18.2.%
64.18.3.%
64.18.4.%
64.18.5.%
64.18.6.%
64.18.7.%
64.18.8.%
64.18.9.%
64.18.10.%
64.18.11.%
64.18.12.%
64.18.13.%
64.18.14.%
64.233.160.%
64.233.161.%
64.233.162.%
64.233.163.%
64.233.164.%
64.233.165.%
64.233.166.%
64.233.167.%
64.233.168.%
64.233.169.%
64.233.170.%
64.233.171.%
64.233.172.%
64.233.173.%
64.233.174.%
64.233.175.%
64.233.176.%
64.233.177.%
64.233.178.%
64.233.179.%
64.233.180.%
64.233.181.%
64.233.182.%
64.233.183.%
64.233.184.%
64.233.185.%
64.233.186.%
64.233.187.%
64.233.188.%
64.233.189.%
64.233.190.%
66.102.0.%
66.102.1.%
66.102.2.%
66.102.3.%
66.102.4.%
66.102.5.%
66.102.6.%
66.102.7.%
66.102.8.%
66.102.9.%
66.102.10.%
66.102.11.%
66.102.12.%
66.102.13.%
66.102.14.%
66.249.80.%
66.249.81.%
66.249.82.%
66.249.83.%
66.249.84.%
66.249.85.%
66.249.86.%
66.249.87.%
66.249.88.%
66.249.89.%
66.249.90.%
66.249.91.%
66.249.92.%
66.249.93.%
66.249.94.%
72.14.192.%
72.14.193.%
72.14.194.%
72.14.195.%
72.14.196.%
72.14.197.%
72.14.198.%
72.14.199.%
72.14.200.%
72.14.201.%
72.14.202.%
72.14.203.%
72.14.204.%
72.14.205.%
72.14.206.%
72.14.207.%
72.14.208.%
72.14.209.%
72.14.210.%
72.14.211.%
72.14.212.%
72.14.213.%
72.14.214.%
72.14.215.%
72.14.216.%
72.14.217.%
72.14.218.%
72.14.219.%
72.14.220.%
72.14.221.%
72.14.222.%
72.14.223.%
72.14.224.%
72.14.225.%
72.14.226.%
72.14.227.%
72.14.228.%
72.14.229.%
72.14.230.%
72.14.231.%
72.14.232.%
72.14.233.%
72.14.234.%
72.14.235.%
72.14.236.%
72.14.237.%
72.14.238.%
72.14.239.%
72.14.240.%
72.14.241.%
72.14.242.%
72.14.243.%
72.14.244.%
72.14.245.%
72.14.246.%
72.14.247.%
72.14.248.%
72.14.249.%
72.14.250.%
72.14.251.%
72.14.252.%
72.14.253.%
72.14.254.%
74.125.%
173.194.%
207.126.144.%
207.126.145.%
207.126.146.%
207.126.147.%
207.126.148.%
207.126.149.%
207.126.150.%
207.126.151.%
207.126.152.%
207.126.153.%
207.126.154.%
207.126.155.%
207.126.156.%
207.126.157.%
207.126.158.%
209.85.128.%
209.85.129.%
209.85.130.%
209.85.131.%
209.85.132.%
209.85.133.%
209.85.134.%
209.85.135.%
209.85.136.%
209.85.137.%
209.85.138.%
209.85.139.%
209.85.140.%
209.85.141.%
209.85.142.%
209.85.143.%
209.85.144.%
209.85.145.%
209.85.146.%
209.85.147.%
209.85.148.%
209.85.149.%
209.85.150.%
209.85.151.%
209.85.152.%
209.85.153.%
209.85.154.%
209.85.155.%
209.85.156.%
209.85.157.%
209.85.158.%
209.85.159.%
209.85.160.%
209.85.161.%
209.85.162.%
209.85.163.%
209.85.164.%
209.85.165.%
209.85.166.%
209.85.167.%
209.85.168.%
209.85.169.%
209.85.170.%
209.85.171.%
209.85.172.%
209.85.173.%
209.85.174.%
209.85.175.%
209.85.176.%
209.85.177.%
209.85.178.%
209.85.179.%
209.85.180.%
209.85.181.%
209.85.182.%
209.85.183.%
209.85.184.%
209.85.185.%
209.85.186.%
209.85.187.%
209.85.188.%
209.85.189.%
209.85.190.%
209.85.191.%
209.85.192.%
209.85.193.%
209.85.194.%
209.85.195.%
209.85.196.%
209.85.197.%
209.85.198.%
209.85.199.%
209.85.200.%
209.85.201.%
209.85.202.%
209.85.203.%
209.85.204.%
209.85.205.%
209.85.206.%
209.85.207.%
209.85.208.%
209.85.209.%
209.85.210.%
209.85.211.%
209.85.212.%
209.85.213.%
209.85.214.%
209.85.215.%
209.85.216.%
209.85.217.%
209.85.218.%
209.85.219.%
209.85.220.%
209.85.221.%
209.85.222.%
209.85.223.%
209.85.224.%
209.85.225.%
209.85.226.%
209.85.227.%
209.85.228.%
209.85.229.%
209.85.230.%
209.85.231.%
209.85.232.%
209.85.233.%
209.85.234.%
209.85.235.%
209.85.236.%
209.85.237.%
209.85.238.%
209.85.239.%
209.85.240.%
209.85.241.%
209.85.242.%
209.85.243.%
209.85.244.%
209.85.245.%
209.85.246.%
209.85.247.%
209.85.248.%
209.85.249.%
209.85.250.%
209.85.251.%
209.85.252.%
209.85.253.%
209.85.254.%
216.239.32.%
216.239.33.%
216.239.34.%
216.239.35.%
216.239.36.%
216.239.37.%
216.239.38.%
216.239.39.%
216.239.40.%
216.239.41.%
216.239.42.%
216.239.43.%
216.239.44.%
216.239.45.%
216.239.46.%
216.239.47.%
216.239.48.%
216.239.49.%
216.239.50.%
216.239.51.%
216.239.52.%
216.239.53.%
216.239.54.%
216.239.55.%
216.239.56.%
216.239.57.%
216.239.58.%
216.239.59.%
216.239.60.%
216.239.61.%
216.239.62.%
Oday,
Your suggestion won't work as the IP ranges aren't all inclusive. Here is the list that Google says to whitelist.
As an example...how do I white list 64.18.0.x to 64.18.15.x
I should have looked harder in stackoverflow. For others that stumble upon this post, here is the answer that I found at
Whitelist IP addresses ranges using cPanel
64.18.0-15.%
64.233.160-191.%
64.102.0-15.%
66.249.80-95.%
72.14.192-255.%
74.125.%
173.194.%
207.126.144-159.%
209.85.128-255.%
216.239.32-63.%
This is long overdue, but the easiest solution is to use the % wildcard like this to make it easier:
64.18.%.%
64.233.%.%
66.102.%.%
...etc
I'm trying to do some basic url cleaning, so that
www.google.com
www.google.com/
http://google.com
http://google.com/
https://google.com
https://google.com/
are replaced by http://www.google.com (or https://www.google.com in case when https:// is at the beginning).
Basically I'd like to check if there is http/https at the beginning and / at the end in one regexp.
I was trying something like this:
"https://google.com".match(/^(http:\/\/|https:\/\/)(.*)(\/)*$/) in this case I get:
=> #<MatchData "https://google.com" 1:"https://" 2:"google.com" 3:nil>
which is good.
Unfortunately for:
"https://google.com/".match(/^(http:\/\/|https:\/\/)(.*)(\/)*$/) I get:
=> #<MatchData "https://google.com/" 1:"https://" 2:"google.com/" 3:nil> and would like to have 2:"google.com" 3:"/"
Any idea how to do this?
It's obvious if you spot the mistake ;)
You were trying:
^(http:\/\/|https:\/\/)(.*)(\/)*$
The answer is to use:
^(http:\/\/|https:\/\/)(.*?)(\/)*$
This makes the operator "non-greedy", so the tailing forward slash doesn't get swallowed up by the "." operator.
EDIT:
In fact, you should really be using:
^(http:\/\/|https:\/\/)?(www\.)?(.*?)(\/)*$
That way, you will also match your first two examples, which don't have a "http(s)://" in them. You are also splitting out the value/existence of the "www" part. In action: http://www.rubular.com/r/VUoIUqCzzX
EDIT2:
I was bored and wanted to perfect this :P
Here you go:
^(https?:\/\/)?(?:www\.)?(.*?)\/?$
Now, all you need to do is replace your website with the first match (or "http://", if nil), then "www.", then the second match.
In action: http://www.rubular.com/r/YLeO5cXcck
(18 months later) EDIT:
Check out my awesome ruby gem that will help solve your problems!
https://github.com/tom-lord/regexp-examples
/(https?:\/\/)?(?:www\.)?google\.com\/?/.examples # =>
["google.com",
"google.com/",
"www.google.com",
"www.google.com/",
"http://google.com",
"http://google.com/",
"http://www.google.com",
"http://www.google.com/",
"https://google.com",
"https://google.com/",
"https://www.google.com",
"https://www.google.com/"]
/(https?:\/\/)?(?:www\.)?google\.com\/?/.examples.map(&:subgroups) # =>
[[],
[],
[],
[],
["http://"],
["http://"],
["http://"],
["http://"],
["https://"],
["https://"],
["https://"],
["https://"]]
Here is my setup, a bit changed standard edition.
# app/config/routing.yml
_internal:
resource: "#AcmeDemoBundle/Controller/"
prefix: /{_locale}
requirements:
_locale: en|sr
And added /{_locale} in security.yml.
Routes before:
Name Method Pattern
_welcome ANY /
_demo_login ANY /demo/secured/login
_security_check ANY /demo/secured/login_check
_demo_logout ANY /demo/secured/logout
acme_demo_secured_hello ANY /demo/secured/hello
_demo_secured_hello ANY /demo/secured/hello/{name}
_demo_secured_hello_admin ANY /demo/secured/hello/admin/{name}
_demo ANY /demo/
_demo_hello ANY /demo/hello/{name}
_demo_contact ANY /demo/contact
_wdt ANY /_wdt/{token}
_profiler_search ANY /_profiler/search
_profiler_purge ANY /_profiler/purge
_profiler_import ANY /_profiler/import
_profiler_export ANY /_profiler/export/{token}.txt
_profiler_search_results ANY /_profiler/{token}/search/results
_profiler ANY /_profiler/{token}
_configurator_home ANY /_configurator/
_configurator_step ANY /_configurator/step/{index}
_configurator_final ANY /_configurator/final
Routes after:
Name Method Pattern
_welcome ANY /
_wdt ANY /_wdt/{token}
_profiler_search ANY /_profiler/search
_profiler_purge ANY /_profiler/purge
_profiler_import ANY /_profiler/import
_profiler_export ANY /_profiler/export/{token}.txt
_profiler_search_results ANY /_profiler/{token}/search/results
_profiler ANY /_profiler/{token}
_configurator_home ANY /_configurator/
_configurator_step ANY /_configurator/step/{index}
_configurator_final ANY /_configurator/final
_demo_login ANY /{_locale}/demo/secured/login
_security_check ANY /{_locale}/demo/secured/login_check
_demo_logout ANY /{_locale}/demo/secured/logout
acme_demo_secured_hello ANY /{_locale}/demo/secured/hello
_demo_secured_hello ANY /{_locale}/demo/secured/hello/{name}
_demo_secured_hello_admin ANY /{_locale}/demo/secured/hello/admin/{name}
_demo ANY /{_locale}/
_demo_hello ANY /{_locale}/hello/{name}
_demo_contact ANY /{_locale}/contact
Which ofc leads to No route found for "GET /en/demo/hello/World" for /en/demo/hello/World url.
Any idea how to fix this?
Additionally, I would like to implement per domain locale. I was trying https://github.com/schmittjoh/JMSI18nRoutingBundle, but for some reason it does not work with latest Symfony 2.0.9, at least for me. I was following the doc, but I got similar 404 error when trying prefixed urls.
Defining default values and requirements for placeholders in prefix is not possible in Symfony version 2.0.9. You'd have to upgrade to 2.1, which is currently in active development.