This file contains hidden or 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
| #!/bin/bash | |
| container_ids=$(docker ps -aq) | |
| for id in $container_ids; do | |
| log_size=$(docker inspect --format='{{.LogPath}}' $id | xargs du -sh | awk '{print $1}') | |
| name=$(docker inspect --format='{{.Name}}' $id | sed 's/\///') | |
| echo "Container ID: $id" |
This file contains hidden or 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
| #!/bin/sh | |
| # Call: killall forti | |
| # | |
| # Kill all process that contains the arg1 text | |
| for p in `pgrep ${$1}`; | |
| do echo "PID forti: ${p} Killing..." && kill $p && echo "${p} killed\!" ; | |
| done |
This file contains hidden or 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
| SELECT | |
| DB_NAME() AS DatbaseName | |
| , SCHEMA_NAME(o.Schema_ID) AS SchemaName | |
| , OBJECT_NAME(s.[object_id]) AS TableName | |
| , i.name AS IndexName | |
| , ROUND(avg_fragmentation_in_percent,2) AS [Fragmentation %] | |
| FROM sys.dm_db_index_physical_stats(db_id(),null, null, null, null) s | |
| INNER JOIN sys.indexes i ON s.[object_id] = i.[object_id] | |
| AND s.index_id = i.index_id | |
| INNER JOIN sys.objects o ON i.object_id = O.object_id |
This file contains hidden or 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
| echo | openssl s_client -servername rubygems.org -connect rubygems.org:443 2>/dev/null | openssl x509 -text -noout | |
| echo | openssl s_client -servername rubygems.org -connect rubygems.org:443 2>/dev/null | openssl verify -CApath /etc/ssl/certs/ |
This file contains hidden or 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
| #!/bin/bash | |
| if command -v gs >/dev/null 2>&1 ; then | |
| echo "gs found" | |
| else | |
| echo "GPL Ghostscript not found" | |
| fi | |
| out_pages=$(echo $1 | sed -e "s/\.pdf$/-p%02d\.jpg/g") | |
| out_files=$(echo $1 | sed -e "s/\.pdf$/-p*\.jpg/g") |
This file contains hidden or 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 example configuration file. | |
| # This is mostly being used for generation of certificate requests. | |
| # | |
| openssl_conf = default_conf | |
| #################################################################### | |
| [ default_conf ] |
This file contains hidden or 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
| # Add fortisslvpn repository | |
| sudo add-apt-repository ppa:ar-lex/fortisslvpn | |
| sudo apt-get update | |
| sudo apt-get install | |
| # Calling | |
| openfortivpn vpn.xxxxxx.com.br:10443 -u pedro.xyz -p ****** --trusted-cert xyz |
This file contains hidden or 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
| USE master | |
| go | |
| SELECT | |
| sdes.session_id | |
| ,sdes.login_time | |
| ,sdes.last_request_start_time | |
| ,sdes.last_request_end_time | |
| ,sdes.is_user_process | |
| ,sdes.host_name | |
| ,sdes.program_name |
This file contains hidden or 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
| using System; | |
| using System.Text.RegularExpressions; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| var hasRepeatedCharacter = new Regex(@"^([0-9]+)\1$"); | |
| string text = "123123"; |
This file contains hidden or 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
| using System; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| var e = Teste.Cliente | Teste.Documentos; | |
| Console.WriteLine(e.HasFlag(Teste.Cliente)); | |
| Console.WriteLine(e.HasFlag(Teste.Liberacoes)); | |
| Console.WriteLine(e.HasFlag(Teste.Documentos)); |
NewerOlder