This file contains hidden or 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
| // | |
| // PageVC.swift | |
| // PageViewControllerTutorial | |
| // | |
| // Created by Volodymyr Romanov on 10/10/16. | |
| // Copyright © 2016 Vladimir Romanov. All rights reserved. | |
| // | |
| import UIKit |
This file contains hidden or 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
| def sign_data(private_key_loc, data): | |
| ''' | |
| param: private_key_loc Path to your private key | |
| param: package Data to be signed | |
| return: base64 encoded signature | |
| ''' | |
| from Crypto.PublicKey import RSA | |
| from Crypto.Signature import PKCS1_v1_5 | |
| from Crypto.Hash import SHA256 | |
| from base64 import b64encode, b64decode |
This file contains hidden or 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
| class ViewController: UIViewController { | |
| private var player:AVPlayer? | |
| private var playerLayer:AVPlayerLayer? | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| print(NSHomeDirectory()) | |
| } |
This file contains hidden or 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
| def verify_sign(public_key_loc, signature, data): | |
| ''' | |
| Verifies with a public key from whom the data came that it was indeed | |
| signed by their private key | |
| param: public_key_loc Path to public key | |
| param: signature String signature to be verified | |
| return: Boolean. True if the signature is valid; False otherwise. | |
| ''' | |
| from Crypto.PublicKey import RSA | |
| from Crypto.Signature import PKCS1_v1_5 |
This file contains hidden or 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
| { | |
| "code": "HNGR", | |
| "name": "Hungr Coin Token", | |
| "desc": "Made your order with hungr ", | |
| "conditions": "" | |
| } |
This file contains hidden or 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
| ## bitwalletrecover.py - recover private keys from your darkcoin wallet | |
| ## (this version was not tested with bitcoin/litecoin). | |
| ## Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), | |
| ## and base58 (https://pypi.python.org/pypi/base58). | |
| ## | |
| ## Starting with Python 3.4, pip is included by default with the Python binary | |
| ## installers. To install pip for older versions 3.x: | |
| ## | |
| ## sudo apt-get install python3-setuptools | |
| ## sudo easy_install3 pip |
This file contains hidden or 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
| # Redis configuration file example. | |
| # | |
| # Note that in order to read the configuration file, Redis must be | |
| # started with the file path as first argument: | |
| # | |
| # ./redis-server /path/to/redis.conf | |
| # Note on units: when memory size is needed, it is possible to specify | |
| # it in the usual form of 1k 5GB 4M and so forth: | |
| # |
This file contains hidden or 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
| [Unit] | |
| Description=Redis In-Memory Data Store | |
| After=network.target | |
| [Service] | |
| User=redis | |
| Group=redis | |
| ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf | |
| ExecStop=/usr/local/bin/redis-cli shutdown | |
| Restart=always |
This file contains hidden or 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
| pragma solidity ^0.4.17; | |
| contract SimpleMiner { | |
| string private myFirstParameter; | |
| bytes private fistByte; |
This file contains hidden or 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 datetime | |
| ################################################################### | |
| # | |
| # Showing the way bits, difficulty, target, and hash work together. | |
| # | |
| ################################################################### | |
| print "Calculating target from bits, verifying the block's hash is valid, and verify the calculated difficulty." |