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
#login as superuser into postgres super user | |
.\psql.exe -u postgres | |
#show all database | |
\l | |
#change the current database to the one that you want to show tables: | |
\c testDb | |
# command from the PostgreSQL command prompt to show tables in the selected database: |
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
#check sign version v1 and v2 | |
java -jar .\apksigner.jar verify --verbose --print-certs .\test-app.apk | |
#check sign version v1, v2, v3, v4 which set by enableV3Signing, enableV4Signing | |
java -jar .\apksigner.jar verify -v -v4-signature-file .\test-app.apk.idsig .\test-app.apk |
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
####################################################################################################### | |
##os-centos-7## | |
#get centos version | |
$cat /etc/centos-release | |
#get system info | |
$hostnamectl | |
#get kernel |
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
SWITCHOFFSET(CONVERT(datetimeoffset, [CreatedAt]), DATENAME(TzOffset, SYSDATETIMEOFFSET())) |
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
git clean -xdf --dry-run //to remove absolutely every file on the .gitignore list | |
dotnet new gitignore //touch .gitignore |
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
-- sys.dm_os_performance_counters is a system Dynamic Management View (DMV) that returns one row for each SQL Server performance counter. It's useful for obtaining information about current performance counter values. | |
declare @cntr_value bigint | |
Select @cntr_value=cntr_value | |
from sys.dm_os_performance_counters | |
where instance_name='Fabrics' and | |
counter_name='Write Transactions/sec' | |
waitfor delay '00:00:01' | |
Select cntr_value -@cntr_value |
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
--<sys.sp_MSforeachtable>: execute sp_spaceused for all of database table | |
--<sp_spaceused>: return rows, index size and data size of table | |
EXEC sys.sp_MSforeachtable 'sp_spaceused ''?'''; | |
--or as table | |
USE [Fabrics] | |
GO | |
CREATE TABLE #TableSpaceUsed( | |
[name] [nvarchar](120) NULL, | |
[rows] [nvarchar](120) NULL, |
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
-- Fabrics V1.2 | |
-- Creating a SQL database from scratch | |
USE Fabrics | |
GO | |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[usp_Fabrics]') AND type in (N'P', N'PC')) | |
DROP PROCEDURE usp_Fabrics | |
GO | |
CREATE PROCEDURE [dbo].usp_Fabrics | |
(@CreateClients INT = 2500, | |
@CreateOrders INT = 5000) |
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
openssl s_client -servername HOSTURL -connect mydomain.com:443 | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 | |
openssl x509 -in ~/Downloads/certi_pem.cer -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 | |
openssl s_client -servername HOSTURL -connect myhost.com:443 | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | hexdump -v -e '/1 "%02x"' |
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
//install | |
adb install package.name.apk | |
//uninstall | |
adb uninstall package.name | |
//proces id | |
adb shell pidof package.name | |
//debug |
NewerOlder