23 Jan 2012
| Command | Description |
|---|---|
| csf -s | Start the firewall rules |
| csf -f | Flush/Stop firewall rules (note: lfd may restart csf) |
| .......some config..... | |
| alertmanager: | |
| ## Deploy alertmanager | |
| ## | |
| enabled: true | |
| ## Service account for Alertmanager to use. | |
| ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ | |
| ## |
23 Jan 2012
| Command | Description |
|---|---|
| csf -s | Start the firewall rules |
| csf -f | Flush/Stop firewall rules (note: lfd may restart csf) |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/jinzhu/gorm" | |
| _ "github.com/lib/pq" | |
| ) | |
| func main() { |
| const Ffmpeg = require(‘fluent-ffmpeg’); | |
| const STREAM_URL = ‘http://icecast.radio24.ch/radio24-rc-96-aac'; | |
| const VOLUME_THRESHOLD = -50; // volume threshold | |
| getMeanVolume(STREAM_URL, function(meanVolume){ | |
| if(meanVolume <= VOLUME_THRESHOLD){ | |
| console.log(“WE HAVE A PROBLEM! VOLUME IS TOO LOW!”); | |
| }else{ | |
| console.log(‘ALL GOOD!’); | |
| } |
| const axios = require('axios') | |
| /* ... */ | |
| const params = new URLSearchParams() | |
| params.append('name', 'Akexorcist') | |
| params.append('age', '28') | |
| params.append('position', 'Android Developer') | |
| params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
| params.append('awesome', true) |
| # Block Facebook IPv4 | |
| 127.0.0.1 www.facebook.com | |
| 127.0.0.1 facebook.com | |
| 127.0.0.1 login.facebook.com | |
| 127.0.0.1 www.login.facebook.com | |
| 127.0.0.1 fbcdn.net | |
| 127.0.0.1 www.fbcdn.net | |
| 127.0.0.1 fbcdn.com | |
| 127.0.0.1 www.fbcdn.com | |
| 127.0.0.1 static.ak.fbcdn.net |
| #!/bin/sh | |
| # Generate self signed root CA cert | |
| openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/[email protected]" | |
| # Generate server cert to be signed | |
| openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/[email protected]" | |
| # Sign the server cert |
| image: docker:latest | |
| variables: | |
| REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME> | |
| REGION: eu-central-1 | |
| TASK_DEFINTION_NAME: <TASK DEFINITION NAME> | |
| CLUSTER_NAME: <CLUSTER NAME> | |
| SERVICE_NAME: <SERVICE NAME> | |
| services: |
| curl --include \ | |
| --no-buffer \ | |
| --header "Connection: Upgrade" \ | |
| --header "Upgrade: websocket" \ | |
| --header "Host: example.com:80" \ | |
| --header "Origin: http://example.com:80" \ | |
| --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
| --header "Sec-WebSocket-Version: 13" \ | |
| http://example.com:80/ |