Skip to content

Instantly share code, notes, and snippets.

View wedojava's full-sized avatar
🎯
Focusing

回风 wedojava

🎯
Focusing
View GitHub Profile
@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;
@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 / 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 / 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 / Mintty.md
Last active November 17, 2021 14:52 — forked from mohnish/Mintty.md
Mintty Themes for Windows
@wedojava
wedojava / sublimeConfig
Created February 19, 2020 18:50
sublimeConfig[mac]
{
"always_show_minimap_viewport": false,
"bold_folder_labels": false,
"color_scheme": "Packages/User/SublimeLinter/Facebook (SL).tmTheme",
"enable_tab_scrolling": false,
"font_face": "Fira Code",
"font_options":
[
"gray_antialias"
],
@wedojava
wedojava / init.md
Last active February 10, 2020 06:33
windows init setting

GPEdit

gpedit.msc

Scoop

Install Scoop

set-executionpolicy remotesigned -scope currentuser
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
{
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Material Theme",
"terminal.integrated.fontFamily": "Fira Code",
"editor.fontFamily": "'Fira Code', 'Fira Mono', Consolas, 'Courier New', monospace",
"editor.lineNumbers": "off",
"editor.lineHeight": 20,
"editor.fontSize": 13,
"editor.fontLigatures": true,
"terminal.integrated.fontWeightBold": "bold"
@wedojava
wedojava / Material-Theme-BHL.sublime-theme
Last active December 22, 2015 06:06
MySublimeText3-Settings
[
/* @ EMPTY WINDOW
* Style for empty (no tabs) window
* 安装完 Material Theme 后,此文件放到 Packages/Material Theme/ 目录下面即可
* 主要修改了原有的背景颜色来搭配 Facebook (SL).tmTheme
========================================================================= */
{
"class": "sheet_container_control",
@wedojava
wedojava / gist:41296a19a759a57c3d6d
Created March 25, 2015 09:59
用laravel5做下拉列表,列表内容从数据库读取
放个例子:
视图:{!!Form::select('difficulty', $difficulties)!!}
控制器:
public function edit($id)
{
return view('admin.questions.edit')
->withQuestion(Question::find($id))
->withDifficulties(Difficulty::lists('name', 'id'));
}