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 | |
sudo systemctl enable sshd | |
clear |
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
package ... | |
import com.google.api.services.bigquery.model.TableFieldSchema; | |
import com.google.api.services.bigquery.model.TableRow; | |
import com.google.api.services.bigquery.model.TableSchema; | |
import com.google.api.services.bigquery.model.TimePartitioning; | |
import com.google.common.collect.ImmutableList; | |
import org.apache.beam.sdk.Pipeline; | |
import org.apache.beam.sdk.coders.Coder; | |
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO; |
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
export default copyToClipboard (text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
// IE specific code path to prevent textarea being shown while dialog is visible. | |
return clipboardData.setData('Text', text) | |
} else if (document.queryCommandSupported && document.queryCommandSupported('copy')) { | |
let textarea = document.createElement('textarea') | |
textarea.textContent = text | |
textarea.style.position = 'fixed' // Prevent scrolling to bottom of page in MS Edge. | |
document.body.appendChild(textarea) | |
textarea.select() |
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 -sSO https://dl.google.com/cloudagents/install-monitoring-agent.sh | |
sudo bash install-monitoring-agent.sh | |
rm install-monitoring-agent.sh | |
cd /opt/stackdriver/collectd/etc/collectd.d/ | |
sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/mongodb.conf | |
cd - | |
sudo service stackdriver-agent restart |
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
#!/bash/sh | |
curl -sS https://dl.google.com/cloudagents/install-monitoring-agent.sh | sudo bash | |
cd /opt/stackdriver/collectd/etc/collectd.d/ | |
sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/redis.conf | |
cd - | |
sudo service stackdriver-agent restart |
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
LoadPlugin redis | |
<Plugin "redis"> | |
<Node "mynode"> | |
# When using non-standard Redis configurations, replace the below with | |
#Host "REDIS_HOST" | |
#Port "REDIS_PORT" | |
Host "localhost" | |
Port "6379" | |
Timeout 2000 | |
Password "SECRET" |
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
#!/bash/sh | |
sudo service google-fluentd stop && sudo apt-get remove google-fluentd google-fluentd-catch-all-config |
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
# Block | |
sudo iptables -A INPUT -s 10.240.0.22 -j DROP | |
# Remove | |
sudo iptables -D INPUT -s 10.240.0.22 -j DROP |
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 -sS https://dl.google.com/cloudagents/install-monitoring-agent.sh | sudo bash |
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 | |
# Dry run | |
find . -type f -name "*.log" -exec echo {} \; | |
find . -type f -name "*.log" -exec truncate -s 0 {} \; |