Skip to content

Instantly share code, notes, and snippets.

View b3h3rkz's full-sized avatar
🏠
Working from home

Bernard Parah b3h3rkz

🏠
Working from home
View GitHub Profile
@b3h3rkz
b3h3rkz / my rinkeby address
Created January 19, 2018 17:35
Rinkeby Testnet Address
0x354f535C25363419DE8169e39bd6719Bf1766aCF
This script creates a swapfile to fix this error. Tested on ubuntu 16
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
@b3h3rkz
b3h3rkz / virtualenv_mac.md
Last active March 17, 2018 12:53
Setting up virtualenv for python3 on Mac
Requirements
  • Python 3
  • Pip 3
$ brew install python3

Install via pip:

@b3h3rkz
b3h3rkz / Angular Cache
Last active June 3, 2018 17:40
Prevent angular app from caching
Developing apps with angularjs comes with it's own headaches, one of which is the caching of files in the browser.
As a developer you can make use of plugins like Classic Cache Killer or disable caching in devtools. You can't go around asking all
your users to clear their cache after every new update
After going through several SO posts and blogs, only one solution worked for me(based on my setup).
Using Nginx, I added this directive
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
}
@b3h3rkz
b3h3rkz / gist:e64961a324d008a2423abe2b0ed70c1c
Last active November 27, 2020 20:57
Ubuntu Server Dev Setup
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
echo "1. server dependencies updated and upgraded"
echo " "
echo "2. installing build essentials and python-dev"
@b3h3rkz
b3h3rkz / Zipaligns
Created December 6, 2018 13:15
Add Zipalign to global path on Mac OSX
echo "export PATH=\$PATH:~/Library/Android/sdk/build-tools/x.x.x/" >> ~/.bash_profile&& . ~/.bash_profile
@b3h3rkz
b3h3rkz / Activate Office 2019 for macOS VoL.md
Created August 9, 2019 07:09 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDsTF0HYvycAswKLyRJByRYaXmzxeejIlL57z+rAs5hkk+tz7o/yEMrLSDxg/l6G3ptcWjETUjlOxadtHFW67L36qow+c4kLjk9jd/KJ4DGTQlo9ajEj0aAkza/eTMtATSlozJwUwJREOQHFF9qb2Lq1Bf3lDunTebDg5o44qMp+Y7MhVLglbn8fypWcOrr03ENmjItZcAF6MyF4W2KL0sfNQoAiuOabnJKL3zAENet0ZBEyULFYmMjEoe9vwsEHcZKzGzdh5QdRfAMc/EkdMnk8S4+p2Qw6wYLSYViVYJHsqCmjvzx6ZE9XYAmj+XQ5Z6y4RwFGMu9sSEY+sQAtc59 [email protected]
@b3h3rkz
b3h3rkz / gist:51a7a4e465310da9a193e2cb7a933093
Created February 5, 2020 05:58
Django email confirmation resend
from rest_framework import generics
from allauth.account.utils import send_email_confirmation
from rest_framework.views import APIView
from rest_framework import status
from rest_framework.response import Response
from rest_framework.permissions import AllowAny
# request a new confirmation email
class EmailConfirmation(APIView):

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.