Skip to content

Instantly share code, notes, and snippets.

View daniloab's full-sized avatar
🎯
Focusing

Danilo Assis daniloab

🎯
Focusing
View GitHub Profile

Brew

  • list of services running
brew services list
  • mongodb-community
brew services start mongodb-community

Arch Linux

List of fast and common commands

YAY

list

  • all depencies yay -Qe <packagename>
  • all dev-dependecies yay -Qs <packagename>
  • specific dependencies yay -Qi <packagename> The usage of -i rather than -s ensures you will check for exactly that package and not for the presence of a a package containing the package name in its name.

How to fix Mongodb Memory Server Error 403 - Arch Linux

My case was commented here typegoose/mongodb-memory-server#347

Hi, Im get this same error but for Arch Linux.

My mongo is the 4.4.5 version and when I try run a jest test returns the following error for me:

Falling back to legacy MongoDB build!
export const EMAIL_WHITELIST = [
'0-mail.com',
'027168.com',
'0815.su',
'0sg.net',
'10mail.org',
'10minutemail.co.za',
'11mail.com',
'123.com',
'123box.net',
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.9/http/client.py", line 1253, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1299, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)

filter

volume

  • docker ps --filter volume=VOLUME_NAME

list

container doc

  • docker container ls

    • flags: -a: all containers
  • all status exited docker ps --filter "status=exited

rvm

version

  • change version rvm use 2.5.8

run a http post request with PHP

  • create a new file with code below:
<?php
function httpPost($url, $data)
{
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_POST, true);
 curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
jun 08 11:45:06 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 42929, resource id: 119537670, major code: 18 (ChangeProperty), minor code: 0
jun 08 11:45:10 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 44644, resource id: 119537670, major code: 18 (ChangeProperty), minor code: 0
jun 08 11:45:15 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 45752, resource id: 119537670, major code: 18 (ChangeProperty), minor code: 0
jun 08 11:47:12 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 55608, resource id: 14785991, major code: 3 (GetWindowAttributes), minor code: 0
jun 08 11:47:12 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 55609, resource id: 14785991, major code: 14 (GetGeometry), minor code: 0
jun 08 11:49:45 daniloabarch plasmashell[1649]: org.kde.plasma.notifications