Sunday, August 27, 2017
Monday, August 21, 2017
SQL Server
SQL Server:
Number of tables and sizes (Credit : stack overflow)
SELECT
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB,
CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN
sys.schemas s ON t.schema_id = s.schema_id
WHERE
t.NAME NOT LIKE 'dt%'
AND t.is_ms_shipped = 0
AND i.OBJECT_ID > 255
GROUP BY
t.Name, s.Name, p.Rows
ORDER BY
t.Name
Size of Index
SELECT
i.[name] AS IndexName,
t.[name] AS TableName,
SUM(s.[used_page_count]) * 8 AS IndexSizeKB
FROM sys.dm_db_partition_stats AS s
INNER JOIN sys.indexes AS i ON s.[object_id] = i.[object_id]
AND s.[index_id] = i.[index_id]
INNER JOIN sys.tables t ON t.OBJECT_ID = i.object_id
GROUP BY i.[name], t.[name]
ORDER BY i.[name], t.[name]
Friday, July 28, 2017
Monday, July 24, 2017
Redshift Spectrum
http://docs.aws.amazon.com/redshift/latest/dg/c-getting-started-using-spectrum-query-s3-data.html
Dabbling with Redshift Spectrum
Amazon Redshift uses massively parallel processing (MPP) to achieve fast execution of complex queries operating on large amounts of data. Redshift Spectrum extends the same principle to query external data, using multiple Redshift Spectrum instances as needed to scan files. Place the files in a separate folder for each table.
Sunday, July 23, 2017
Big Data - Part 6
- Asp .net to parse Query
- Parquet as Storage format
- https://github.com/google/protobuf
https://www.sumologic.com/blog/devops/kinesis-streams-vs-firehose/
https://www.sumologic.com/wp-content/uploads/DemystifyingAmazonKinesis_infographic.pdf
Kafka Vs Kineis
https://blog.insightdatascience.com/ingestion-comparison-kafka-vs-kinesis-4c7f5193a7cd
https://hackernoon.com/processing-real-time-big-data-streams-using-kinesis-lambda-561a029ef305
Sunday, July 16, 2017
Security Training
Installing Kali
https://aws.amazon.com/marketplace/pp/B01M26MMTT
https://www.exploit-db.com/google-hacking-database/
https://www.alienvault.com/blogs/security-essentials/configuring-kali-linux-on-amazon-aws-cloud-for-free
http://toolbar.netcraft.com/site_report?url=http://shop.cricut.com
Installing VNC on Ubuntu finally
sudo apt-get updatesudo apt-get install xfce4 xfce4-goodies tightvncserverapt-get install gnome-core kali-defaults kali-root-login desktop-base
Tuesday, July 4, 2017
MVC , MVP , MVVM on Android
http://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference
http://www.bigdev.de/2014/02/gui-design-patterns-mvc-mvp-vs-mvvm.html
https://news.realm.io/news/eric-maxwell-mvc-mvp-and-mvvm-on-android/
https://code.tutsplus.com/tutorials/an-introduction-to-model-view-presenter-on-android--cms-26162
Model-View-Presenter
For example, when someone clicks the "Save" button, the event handler delegates to the Presenter's "OnSave" method. Once the save is completed, the Presenter will then call back the View through its interface so that the View can display that the save has completed.
AWS Scripting
brew tap wallix/awless; brew install awless
awless config set aws.profile devawless config set aws.profile prod
awless list instances --filter name=api2-ASG production1
Aws Links
News
https://github.com/open-guides/og-aws#ecs-tips
https://aws.amazon.com/blogs/aws/
https://www.youtube.com/channel/UCT-nPlVzJI-ccQXlxjSvJmw
https://redash.io/
Utils
http://blog.powerupcloud.com/2016/10/09/application-load-balancer/
http://rclone.org/
https://github.com/thinhpham/aws-tools
https://github.com/Fullscreen/aws-rotate-key
HTTP2
https://aws.amazon.com/blogs/aws/page/9/
Monday, July 3, 2017
Sunday, July 2, 2017
Sunday, June 25, 2017
Android Graphics
https://developer.android.com/reference/android/view/SurfaceView.html
https://developer.android.com/reference/android/graphics/Canvas.html
https://developer.android.com/reference/android/graphics/Canvas.html#drawPath(android.graphics.Path, android.graphics.Paint)
http://android-er.blogspot.nl/2011/08/drawpath-on-canvas.html
path.lineTo(x1, y1);
path.cubicTo(x1, y1, x2, y2, x3, y3);path.quadTo(x1, y1, x2, y2);
Sunday, June 18, 2017
Saturday, June 17, 2017
Sunday, June 11, 2017
Sunday, June 4, 2017
Managing Elastic Search Domains
http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html
To prevent overloading a dedicated master node, you can monitor usage with the Amazon CloudWatch metrics that are shown in the following table. Use a larger instance type for dedicated master nodes when these metrics reach their respective maximum values.
| FreeStorageSpace (Minimum) | Specifies the free space, in megabytes, for the single data node with the least available free space in a cluster. Amazon ES throws a ClusterBlockExceptionwhen this metric reaches 0. To recover, you must either delete indices, add larger instances, or add EBS-based storage to existing instances. For more information, see Recovering from a Lack of Free Storage Space.
Relevant statistics: Minimum
|
| CloudWatch Metric | Guideline |
|---|---|
| MasterCPUUtilization | Measures the percentage utilization of the CPU for the dedicated master nodes. We recommend increasing the size of the instance type when this metric exceeds 40% with a domain status of Active and exceeds 60% with a domain status of Processing. |
| MasterJVMMemoryPressure | Measures the percentage utilization of the JVM memory for the dedicated master nodes. We recommend increasing the size of the instance type when this metric exceeds 60% with a domain status of Active and exceeds 85% with a domain status of Processing. |
Tuesday, May 30, 2017
Sunday, May 28, 2017
Thursday, May 25, 2017
ECS - Docker
https://docs.bitnami.com/containers/how-to/ecs-rds-tutorial/
https://aws.amazon.com/blogs/compute/microservice-delivery-with-amazon-ecs-and-application-load-balancers/
https://aws.amazon.com/blogs/aws/powerful-aws-platform-features-now-for-containers/
Dynamic Port Mapping
http://www.awsomeblog.com/aws-application-load-balancer-amazon-ecs-using-dynamic-port-mapping/#
http://www.tothenew.com/blog/dynamic-port-mapping-in-ecs-with-application-load-balancer/
Asp.NET Core
https://blogs.msdn.microsoft.com/stevelasker/2016/09/29/building-optimized-docker-images-with-asp-net-core/
https://medium.com/trafi-tech-beat/running-net-core-on-docker-c438889eb5a
Subscribe to:
Posts (Atom)


































