Skip to content

Instantly share code, notes, and snippets.

View wedojava's full-sized avatar
🎯
Focusing

回风 wedojava

🎯
Focusing
View GitHub Profile
@wedojava
wedojava / hexo2hugo.py
Created July 26, 2020 10:41
This is written for convert from hexo to hugo, also migrate from hexo to hugo.
import os
import os.path
def walk_over(w_path):
"""Walk in w_path folder and get all filenames back
:w_path: walk folder path
:returns: the filename list
@wedojava
wedojava / PatchExtract125.ps1
Created July 29, 2020 10:22 — forked from anonymous/PatchExtract125.ps1
Patch Extract v1.25 by Greg Linares (@Laughing_Mantis)
<#
================
PATCHEXTRACT.PS1
=================
Version 1.25 Microsoft MSU Patch Extraction and Patch Organization Utility by Greg Linares (@Laughing_Mantis)
This Powershell script will extract a Microsoft MSU update file and then organize the output of extracted files and folders.
Organization of the output files is based on the patch's files and will organize them based on their archicture (x86, x64, or wow64)
as well as their content-type, ie: resource and catalog files will be moved to a JUNK subfolder and patch binaries and index files will
@wedojava
wedojava / Faucet.sol
Last active August 21, 2020 04:10
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&gist=
pragma solidity ^0.4.17;
contract Faucet{
function withdraw(uint amount) public {
require(amount<= 1000000000000000000);
msg.sender.transfer(amount);
}
function() public payable{}
}
@wedojava
wedojava / 1_Storage.sol
Created August 21, 2020 08:39
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;