• 5ffd57393a85553ab55b
• 5cd28e2a812e5c65c9f7320e0726da18
• b6a6676a84b51c8200d0673a5b4a87c5
"Formal education will make you a living. Self-education will make you a fortune."
"Formal education will make you a living. Self-education will make you a fortune."
| # | |
| # Ubuntu 18.04 (Bionic Beaver) | |
| # | |
| # Basic packages i usually install. | |
| # | |
| # Author: Julius Beckmann <github@h4cc.de> | |
| # | |
| # Upgraded Script from 17.04: https://gist.github.com/h4cc/09b7fe843bb737c8039ac62d831f244e | |
| # Upgraded Script from 16.04: https://gist.github.com/h4cc/fe48ed9d85bfff3008704919062f5c9b |
| let isRefreshing = false; | |
| let refreshSubscribers = []; | |
| const instance = axios.create({ | |
| baseURL: Config.API_URL, | |
| }); | |
| instance.interceptors.response.use(response => { | |
| return response; | |
| }, error => { |
| /* ******************************************************************************************* | |
| * GLOBAL OBJECTS > ARRAY | |
| * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array | |
| * ******************************************************************************************* */ | |
| // Global object: properties | |
| Array.length // Reflects the number of elements in an array | |
| // Global object: methods |
| import hashlib as hasher | |
| import datetime as date | |
| # Define what a Snakecoin block is | |
| class Block: | |
| def __init__(self, index, timestamp, data, previous_hash): | |
| self.index = index | |
| self.timestamp = timestamp | |
| self.data = data | |
| self.previous_hash = previous_hash |
| import hashlib as hasher | |
| class Block: | |
| def __init__(self, index, timestamp, data, previous_hash): | |
| self.index = index | |
| self.timestamp = timestamp | |
| self.data = data | |
| self.previous_hash = previous_hash | |
| self.hash = self.hash_block() | |
| // No Security | |
| { | |
| "rules": { | |
| ".read": true, | |
| ".write": true | |
| } | |
| } |
| // Add a 401 response interceptor | |
| window.axios.interceptors.response.use(function (response) { | |
| return response; | |
| }, function (error) { | |
| if (401 === error.response.status) { | |
| swal({ | |
| title: "Session Expired", | |
| text: "Your session has expired. Would you like to be redirected to the login page?", | |
| type: "warning", | |
| showCancelButton: true, |