The gist aims to show settings needed to run mongo
in a docker
container.
Along with essential files come files needed to reproduce the case.
This file contains 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
# shellcheck shell=bash | |
## | |
# serialize_array | |
# Serializes a bash array to a string, with a configurable seperator. | |
# | |
# $1 = source varname ( contains array to be serialized ) | |
# $2 = target varname ( will contian the serialized string ) | |
# $3 = seperator ( optional, defaults to $'\x01' ) | |
# |
Without either MONGO_INITDB_ROOT_USERNAME
, or MONGO_INITDB_ROOT_PASSWORD
the access is unrestricted.
docker-compose.yml
:
version: '3'
services:
mongo:
image: mongo:4
This file contains 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
More recent resolution: | |
1. cd ~/../../etc (go to etc folder in WSL). | |
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line). | |
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line). | |
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian). | |
5. cd ~/../../etc (go to etc folder in WSL). | |
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file). | |
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and | |
secondary. |
This file contains 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
from locust import HttpLocust, TaskSet, task | |
import json | |
class UserBehavior(TaskSet): | |
def on_start(self): | |
# this retrieves a coookie from the server and stores in in a RequestsCookieJar: self.locust.client.cookes | |
# that is, it stores the cookie on an instance of this class, not the class itself (as your code does) | |
# your server may have different requirements for how the login request should look, but this worked for me | |
self.client.post("/login", |
This file contains 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
Below is a common error when trying to setup CI/CD using fastlane or raw XcodeBuild/Xcrun command | |
"error: exportArchive: No "iOS In House" profiles for team" or error: exportArchive: No "adhoc In House" profiles for team | |
Fixing it : | |
1) Easiest way is to make a build archive in Xcode, Export using organizer and Saving it in a folder. | |
2) Go to the folder, open Export Options.plist and replicate the same in Fastlane - build_app or gym - export options | |
3) In case of XcodeBuild - Replace the same in Export Options.plist which is provided in XCodeBuild command and try again | |
4) Make a build, thank me . |
This file contains 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
##################### | |
# | |
# Use this with or without the .gitattributes snippet with this Gist | |
# create a fixle.sh file, paste this in and run it. | |
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
# This Gist normalizes handling by forcing everything to use Unix style. | |
##################### | |
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
Based on https://www.gnu.org/software/make/manual/html_node/Quick-Reference.html
Directive | Description |
---|---|
define variable define variable = define variable := define variable ::= define variable += define variable ?= endef |
Define multi-line variables. |
undefine variable |
Undefining variables. |
This file contains 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
import * as React from 'react'; | |
import * as hash from 'object-hash'; | |
import { | |
TableProps, | |
Table, | |
TableBody, | |
TableCell, | |
TableFooter, | |
TableHeaderCell, |
NewerOlder