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
docker run --rm --entrypoint sh -p 26657:26657 ghcr.io/gnolang/gno/gnoland:master -c 'gnoland config init; gnoland config set rpc.laddr "tcp://0.0.0.0:26657"; gnoland start --lazy' |
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
wget -O - https://rpc.test4.gno.land/genesis | jq '.result.genesis' > genesis.json |
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 main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// Check if item is i an array for any type using reflection | |
func containsAny(items interface{}, value interface{}) bool { | |
itemsValue := reflect.ValueOf(items) |
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 | |
# Run remotely with -> source <(curl -s http://<remote-address-of-this-script>.sh) | |
set -e | |
# Run as su | |
if [ `id -u` -ne 0 ] | |
then | |
echo "You need to be root to run this script" | |
exit 1 |
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
> obj = { rows : [{count: 10}, {count:20}] } | |
{ rows: [ { count: 10 }, { count: 20 } ] } | |
> {rows: [{count: val}]} = obj | |
{ rows: [ { count: 10 }, { count: 20 } ] } | |
> val | |
10 | |
> {rows: [{count}]} = obj | |
{ rows: [ { count: 10 }, { count: 20 } ] } | |
> count | |
10 |
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 | |
# installing Docker CE on AWS AMI Linux | |
# Run remotely with -> source <(curl -s http://<remote-address-of-this-script>.sh) | |
set -e | |
# Run as su | |
if [ `id -u` -ne 0 ] | |
then |
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
docker run -d --name nginx -p 8080:80 -v $(pwd):/usr/share/nginx/html:ro nginx |
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 | |
# installing Docker CE on Ubuntu | |
# Run remotely with -> curl -sfL <http://_remote-address-of-this-script_> | sh - | |
## Compose not installed by default | |
set -e | |
# Run as su | |
if [ `id -u` -ne 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
docker ps -a | grep 'Exited' | awk '{print $1}' | xargs docker rm -f |
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
<!-- TODO: remove autodelete / insert fileAge --> | |
<file:connector name="inputfileObjectConnector" autoDelete="false" pollingFrequency="2000000" recursive="true"> <!-- autoDelete="false" --> | |
<service-overrides messageFactory="org.mule.transport.file.FileMuleMessageFactory" /> | |
</file:connector> | |
<flow name="edition"> | |
<!-- #1 - Read video file input --> | |
<file:inbound-endpoint path="${fs.path.root}${fs.path.untranscoded}" connector-ref="inputfileObjectConnector" comparator="org.mule.transport.file.comparator.OlderFirstComparator" > <!-- 900s -> 15min --> | |
<!-- <file:filename-wildcard-filter pattern=".avi,.mp4"/> -> does not work --> |
NewerOlder