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 | |
rm ~/Library/Preferences/com.apple.appstore.plist | |
rm -r ~/Library/Saved\ Application\ State/com.apple.appstore.savedState | |
rm -r ~/Library/Caches/com.apple.appstore | |
rm -r /private/var/folders/*/*/*/com.apple.appstore |
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 | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer oracle-java7-set-default |
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 | |
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/NOME_DA_UNIDADE --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction |
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 | |
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers |
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 | |
sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist |
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 sqltext.TEXT, | |
req.session_id, | |
req.status, | |
req.command, | |
req.cpu_time, | |
req.total_elapsed_time | |
FROM sys.dm_exec_requests req | |
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext | |
-- Uma das colunas acima é a <code>session_id</code>. |
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
find / -name "*.txt" -exec grep "text here" {} \; -print 2>/dev/null |
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
-- Lista as tabelas de um banco de dados SQL Server, | |
-- junto com o nro. de registros, e tamanho de cada tabela. | |
-- Fonte: http://stackoverflow.com/questions/7892334/get-size-of-all-tables-in-database | |
SELECT | |
t.NAME AS Entidade, | |
p.rows AS Registros, | |
SUM(a.total_pages) * 8 AS EspacoTotalKB, | |
SUM(a.used_pages) * 8 AS EspacoUsadoKB, | |
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS EspacoNaoUsadoKB |
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 | |
* | |
FROM | |
INFORMATION_SCHEMA.COLUMNS | |
WHERE | |
DATA_TYPE = 'VARCHAR' | |
-- Fonte: http://stackoverflow.com/a/2723185 |
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 | |
curl -C - -o arquivo_ja_salvo 'www.example.com/caminho/do/arquivo_ja_salvo' |
OlderNewer