Skip to content

Instantly share code, notes, and snippets.

View v57's full-sized avatar
🐷
Focusing

Dmitry Kozlov v57

🐷
Focusing
View GitHub Profile
@v57
v57 / mongodb-compass-darkmode.sh
Created November 12, 2021 18:48
Adding dark mode to MongoDB Compass on macOS
#!/bin/sh
# Make sure that you opened Compass once before running this script
# This script was tested in 1.29.0 version.
# Other versions may have different index.html location
# so i'll leave you easy access to path properties:
appPath=/Applications/MongoDB\ Compass.app/Contents/Resources
htmlPath=app/build
# Opening our compass directory
@v57
v57 / sh
Last active April 28, 2022 18:53
Install any version of swift on ubuntu
cd "$(dirname "$0")"
# INSERT SWIFT VERSION HERE
version=5.6
# INSERT OS VERSION HERE (no spaces)
os=ubuntu20.04
# removing dots from os for url (ubuntu16.04 will be ubuntu1604)
os2="${os//./}"
# if version is already downloaded so we don't need to do anything
NSError *error;
// Setting your node address
NSURL *nodeURL = [[NSURL alloc] initWithString: @"your node address"];
W3Web3 *node = [[W3Web3 alloc] initWithUrl: nodeURL];
[W3Web3 setDefault: node];
W3Web3 *web3 = [W3Web3 default];
// Setting your mnemonics
W3Mnemonics *mnemonics = [[W3Mnemonics alloc] init: @"fruit wave dwarf banana earth journey tattoo true farm silk olive fence fruit" language:W3BIP39LanguageEnglish error: &error];
@v57
v57 / install.sh
Created May 29, 2017 21:32
Install Swift 3.1 on Ubuntu 16.10 / 17.04
#!/bin/bash
# Copyright (C) 2017 PerfectlySoft Inc.
# Author: Jonathan Guthrie <jono@perfect.com>
WEBLOC=https://swift.org/builds/swift-3.1.1-release/ubuntu1610/swift-3.1.1-RELEASE/swift-3.1.1-RELEASE-ubuntu16.10.tar.gz
SWIFTNAME=$(basename $WEBLOC)
MYDIR=$(dirname $0)
MYNAME=$(basename $0)
MYSUM=$(md5sum $MYDIR/$MYNAME)