Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |
| var http = require('https'); | |
| var querystring = require('querystring'); | |
| // set the post request options | |
| var reqOptions = { | |
| hostname: 'hooks.slack.com', | |
| port: 443, | |
| path: '/services/YOUR/SLACK/HOOK_HERE', | |
| method: 'POST' | |
| }; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| -server | |
| -Xss256k | |
| -Xms1536m | |
| -Xmx1536m | |
| -Xmn512m | |
| -XX:PermSize=350m | |
| -XX:MaxPermSize=350m | |
| -XX:MetaspaceSize=350m | |
| -XX:MaxMetaspaceSize=350m | |
| -XX:+UseParNewGC |
I hereby claim:
To claim this, I am signing this object:
| 'use strict'; | |
| const aws = require('aws-sdk'); | |
| const s3 = new aws.S3({ apiVersion: '2006-03-01' }); | |
| exports.handler = (event, context, callback) => { | |
| const key = decodeURIComponent(event.Records[0].s3.object.key); | |
| const meta = key.split('/'); |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --delete-config retention.ms
| com.sun.management:type=DiagnosticCommand | |
| com.sun.management:type=HotSpotDiagnostic | |
| java.lang:name=CodeCacheManager,type=MemoryManager | |
| java.lang:name=Code Cache,type=MemoryPool | |
| java.lang:name=Compressed Class Space,type=MemoryPool | |
| java.lang:name=G1 Eden Space,type=MemoryPool | |
| java.lang:name=G1 Old Generation,type=GarbageCollector | |
| java.lang:name=G1 Old Gen,type=MemoryPool | |
| java.lang:name=G1 Survivor Space,type=MemoryPool | |
| java.lang:name=G1 Young Generation,type=GarbageCollector |
Copyright (c) 2016, Tom May
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH