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 { ethers } from 'ethers' | |
import Web3Modal from 'web3modal' | |
import WalletConnectProvider from '@walletconnect/web3-provider' | |
async function getWeb3Modal() { | |
const web3Modal = new Web3Modal({ | |
network: 'mainnet', | |
cacheProvider: false, | |
providerOptions: { | |
walletconnect: { |
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 functools | |
from django.conf import settings | |
from django.db import transaction, utils | |
def durable(func): | |
""" | |
Decorator to ensure that a function is not being called within an atomic block. |
Polyglot Unconference 2018
John, from Mobify kickoff presentation
Initial cofounder of mobify, did a lot of early development, solo. Added more developers to the team, got more experience looking at others' code. Learned a lot of things by looking at others' code. As code review policy brought in, junior developers picked stuff up faster.
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
TIME_DURATION_UNITS = ( | |
('week', 60*60*24*7), | |
('day', 60*60*24), | |
('hour', 60*60), | |
('min', 60), | |
('sec', 1) | |
) | |
def human_time_duration(seconds): |
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
SPC | |
SPC: find file | |
, switch buffer | |
. browse files | |
: MX | |
; EX | |
< switch buffer | |
` eval | |
u universal arg | |
x pop up scratch |
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
const ignoreErrors = [ | |
/^No error$/, | |
/__show__deepen/, | |
/_avast_submit/, | |
/Access is denied/, | |
/anonymous function: captureException/, | |
/Blocked a frame with origin/, | |
/can't redefine non-configurable property "userAgent"/, | |
/change_ua/, | |
/console is not defined/, |
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
################## | |
### config.yml ### | |
################## | |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/python:3.6 | |
steps: |
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
# make sure crypt module in use | |
sudo modprobe dm-crypt | |
# Find out which drive it was with the following command: | |
sudo fdisk -l | |
# You must mount /dev/sda3 myvolume | |
# use cryptsetup, device is accessible under /dev/mapper/myvolume | |
sudo cryptsetup luksOpen /dev/sde3 myvolume |
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
[error] | |
ImportError: No module named '_gdbm' | |
[solved] | |
sudo apt-get install python3.5-gdbm | |
[error] | |
ImportError: No module named 'apt_pkg' | |
[solved] | |
locate apt_pkg.so | |
sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-34m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/apt_pkg.so |
NewerOlder