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
| version: '2.1' | |
| services: | |
| php: | |
| tty: true | |
| build: | |
| context: . | |
| dockerfile: tests/Docker/Dockerfile-PHP | |
| args: | |
| version: cli | |
| volumes: |
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
| --- | |
| version: '2' | |
| services: | |
| zookeeper: | |
| image: confluentinc/cp-zookeeper:latest | |
| environment: | |
| ZOOKEEPER_CLIENT_PORT: 2181 | |
| ZOOKEEPER_TICK_TIME: 2000 | |
| kafka: |
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 -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
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
| // ES7, async/await | |
| function sleep(ms = 0) { | |
| return new Promise(r => setTimeout(r, ms)); | |
| } | |
| (async () => { | |
| console.log('a'); | |
| await sleep(1000); | |
| console.log('b'); | |
| })() |
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
| HttpContext.Current = new HttpContext( | |
| new HttpRequest("", "http://tempuri.org", ""), new HttpResponse(new StringWriter())); | |
| NameValueCollection headers = HttpContext.Current.Request.Headers; | |
| Type t = headers.GetType(); | |
| const BindingFlags nonPublicInstanceMethod = BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Instance; | |
| t.InvokeMember("MakeReadWrite", nonPublicInstanceMethod, null, headers, null); | |
| t.InvokeMember("InvalidateCachedArrays", nonPublicInstanceMethod, null, headers, 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
| # Start the MongoDB server | |
| C:\> mongod | |
| # Start a MongoDB client and create a new admin user | |
| C:\> mongo | |
| > use admin | |
| > db.createUser({ user: "admin", pwd: "123456", roles: [{ role: "root", db: "admin" }]}) | |
| # Create a new user for a database of your choice | |
| > use testdb |