Skip to content

Instantly share code, notes, and snippets.

View developerfred's full-sized avatar
🥇
🔥

codingsh developerfred

🥇
🔥
View GitHub Profile
from urllib.parse import urlparse
def show_url(url):
url_data = urlparse(url)
path = url_data.path
remove_path = ["/channel/"]
for channel in remove_path:
id_channel = path.replace(channel, "")
rss_url = '[RSS](https://www.youtube.com/feeds/videos.xml?channel_id=' + id_channel + ')'
return rss_url
pragma solidity ^0.6.8;
import 'https://github.com/aave/aave-protocol/blob/master/contracts/configuration/LendingPoolAddressesProvider.sol'
import 'https://github.com/aave/aave-protocol/blob/master/contracts/lendingpool/LendingPool.sol'
import 'https://github.com/aave/aave-protocol/blob/master/contracts/flashloan/base/FlashLoanReceiverBase.sol'
contract Borrower is FlashLoanReceiverBase {
LendingPoolAddressesProvider provider;
address dai;
@developerfred
developerfred / CommitmentStorage.rs
Last active June 11, 2020 16:44
Plasm Network Doc - Source Code
// Commitment storage: Plapps address => Commitment Child Storage.
Commitment get(fn commitment): T::AccountId => Commitment;
decl_child_storage! {
Commitment {
// Single operator address: OperatorId
OperatorAddress get(fn operator_address): T::AccountId;
// Current block number of commitment chain: BlockNumber
CurrentBlock get(fn current_block): T::BlockNumber;
// History of Merkle Root
@developerfred
developerfred / commands.md
Created June 11, 2020 19:40
Real-Time LockDrop
$ cargo build --release```
/**
* @dev Withdraw function once timestamp has passed unlock time
*/
function () external payable {
assembly {
switch gt(timestamp, sload(0x01))
case 0 { revert(0, 0) }
case 1 {
switch call(gas, sload(0x00), balance(address), 0, 0, 0, 0)
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreihmdivzi7gifk6k2hpbvb4r7escelrt4nhyhafgppjgefzwwdvvgi ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@developerfred
developerfred / mac.md
Last active September 6, 2021 21:24
How to Delete ALL node_modules folders on your machine and Free up HD space!

List Files

$ cd development_folder
$ find . -name "node_modules" -type d -prune | xargs du -chs

10G total

/**
* generates object with all the data submitted during
* bounty creation
* @param {object} form
*/
const transformBountyData = form => {
let data = {};
let disabled = $(form).find(':input:disabled').removeAttr('disabled');
$.each($(form).serializeArray(), function() {

terra wallet address: terra1mcylzqhunqla2smfeh2t07zu38mefusrc40jtw