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
| from litex.soc.cores import uart | |
| from litex.soc.cores.uart import UARTWishboneBridge | |
| from litex_boards.platforms import arty | |
| from litex_boards.targets.arty import BaseSoC | |
| from litex.soc.integration.builder import Builder | |
| class BridgeSoC(BaseSoC): | |
| def __init__(self, platform, *args, **kwargs): |
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 argparse | |
| import importlib | |
| from nmigen_boards.arty_a7 import * | |
| from nmigen import * | |
| from nmigen_soc import wishbone | |
| from uartbridge import UARTBridge | |
| from lambdasoc.periph.sram import SRAMPeripheral | |
| __all__ = ["ArtyWB"] |
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
| use async_std::task; | |
| use in3::prelude::*; | |
| fn main() { | |
| // configure client and API | |
| let mut eth_api = Api::new(Client::new(chain::MAINNET)); | |
| // Setup Incubed contract address | |
| let contract: Address = | |
| serde_json::from_str(r#""0x2736D225f85740f42D17987100dc8d58e9e16252""#).unwrap(); // cannot fail | |
| // Instantiate an abi encoder for the contract call |
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
| [package] | |
| name = "in3-tutorial" | |
| version = "0.0.1" | |
| authors = ["[email protected]"] | |
| [dependencies] | |
| in3 = "0.0.2" | |
| serde_json = "1.0" | |
| async-std = "1.5.0" |
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
| extern crate in3; | |
| use async_std::task; | |
| use in3::prelude::*; | |
| use in3::ipfs::*; | |
| fn main() { | |
| let mut ipfs_api = Api::new(Client::new(chain::IPFS)); | |
| //`put` is an asynchrous request (due to the internal C library). Therefore to block execution | |
| //we use async_std's block_on function |
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
| #!/bin/bash | |
| # References | |
| # http://www.computerhope.com/unix/nc.htm#03 | |
| # https://github.com/daniloegea/netcat | |
| # http://unix.stackexchange.com/questions/26715/how-can-i-communicate-with-a-unix-domain-socket-via-the-shell-on-debian-squeeze | |
| # http://unix.stackexchange.com/questions/33924/write-inside-a-socket-open-by-another-process-in-linux/33982#33982 | |
| # http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip | |
| # http://www.dest-unreach.org/socat/ | |
| # http://stuff.mit.edu/afs/sipb/machine/penguin-lust/src/socat-1.7.1.2/EXAMPLES |
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
| #!/bin/bash | |
| # Copyright (c) 2011 Josh Schreuder | |
| # http://www.postteenageliving.com | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following 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
| #!/bin/bash -ex | |
| # Paste this into ssh | |
| # curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex | |
| # When forking, you can get the URL from the raw (<>) button. | |
| ### Set some command variables depending on whether we are root or not ### | |
| # This assumes you use a debian derivate, replace with yum, pacman etc. | |
| aptget='sudo apt-get' | |
| chsh='sudo chsh' |
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
| #required.... you will find out fast in google :P.... any question is welcome. cmsvalenzuela at gmail | |
| import smtplib | |
| from rq_scheduler import Scheduler | |
| from datetime import datetime, timedelta | |
| from redis import Redis | |
| import re, requests, json | |
| import json,sys | |