#scan for networks sudo iwlist wlan0 scan
Great links:
$ cat /local/file/path | docker exec -i <running-container-id> sh -c 'cat > /inside/docker/file/path' |
public static class Base26Converter | |
{ | |
private const string CharList = "abcdefghijklmnopqrstuvwxyz"; | |
public static String Encode(long input) | |
{ | |
if (input < 0) throw new ArgumentOutOfRangeException("input", input, "input cannot be negative"); | |
char[] clistarr = CharList.ToCharArray(); | |
var result = new Stack<char>(); |
# check boot2docker ip | |
boot2docker ip | |
# get container ip | |
docker inspect container_name | grep IPAddress | |
# expose port in boot2docker vm | |
boot2docker ssh | |
docker@boot2docker:~$ sudo iptables -t nat -A DOCKER -p tcp --dport port_number -j DNAT --to-destination container-ip:port_number | |
# if wont work call `iptables-save` |
# ping all adresses in subnet for seed arp table | |
for /L %N in (1,1,254) do start /b ping -n 1 -w 200 192.168.5.%N | |
arp -a | find "<MAC you're searching for>" |
#scan for networks sudo iwlist wlan0 scan
Great links:
namespace Sample.Web.IntegrationTests.Api.Controllers | |
{ | |
public class BaseServerTests | |
{ | |
private TestServer _server; | |
private HttpClient _client; | |
private TransactionScope _transactionScope; | |
protected HttpClient Client => _client; |
# example: .\prepareConnectionString.ps1 -connectionName "DbConnection" -connectionString "Server=server_name;Database=db_name;User ID=xyz;Password=passw;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" | |
param($connectionName, connectionString) | |
$solItemsFolder = 'SolutionItems' | |
$srcFile = 'ConnectionStrings.config.example' | |
$destinationFile = 'ConnectionStrings.config' | |
Join-Path $solItemsFolder -ChildPath $srcFile | echo | |
$connectionStingsXml = [xml](Get-Content -Path (Join-Path $solItemsFolder -ChildPath $srcFile)) |
/* Drop all non-system stored procs */ | |
DECLARE @name VARCHAR(128) | |
DECLARE @SQL VARCHAR(254) | |
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name]) | |
WHILE @name is not null | |
BEGIN | |
SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']' | |
EXEC (@SQL) |
{ | |
"scripts": { | |
"cf": "ng g component --spec false --flat --inline-style --inline-template", | |
"c": "ng g component --spec false" | |
} | |
} |
# general | |
alefragnani.Bookmarks | |
code-spell-checker | |
Shan.code-settings-sync | |
# .ts & angular dev | |
christian-kohler.npm-intellisense | |
christian-kohler.path-intellisense | |
eg2.tslint | |
rbbit.typescript-hero ##### currently has some problems, doesn't work on VSC v.1.9.1 |