Skip to content

Instantly share code, notes, and snippets.

View DF-wu's full-sized avatar
⚜️
It's not bug, it's a feature.

DF DF-wu

⚜️
It's not bug, it's a feature.
  • NTOU CS
  • Taiwan
  • 08:37 (UTC +08:00)
View GitHub Profile
@DF-wu
DF-wu / gist:25019fc7486b3194dac7ba9f32e9f406
Created October 9, 2023 08:19
docker-compose.yml sameple for medium
services:
photoprism:
image: photoprism/photoprism
restart: unless-stopped
container_name: photoprism
ports:
# web ui
- 52342:2342
# WebUI:
volumes:
@DF-wu
DF-wu / xargsync.sh
Created July 8, 2023 08:31 — forked from MADscientist314/xargsync.sh
execute a parallel rsync with xargs for large data transfers
#!/bin/bash
# Parallel rsync script originally designed for rsyncing
# large ata transfers from RAID to RAID for the Aagaard Lab.
# Author: Michael Jochum
# Location: Baylor College of Medicine, Houston, TX, USA
# Contact : michael.jochum@bcm.edu
# Date : 2 November 2020
##################################
#Step 0: fill this shit out
@DF-wu
DF-wu / DiscordWebhook.java
Created June 7, 2020 08:37 — forked from k3kdude/DiscordWebhook.java
Java DiscordWebhook class to easily execute Discord Webhooks
import javax.net.ssl.HttpsURLConnection;
import java.awt.Color;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@DF-wu
DF-wu / userscript.js
Created April 22, 2020 07:05 — forked from stanley2058/README.md
Remove Facebook Ad Posts(zh-TW)
// ==UserScript==
// @name Remove Facebook Ad Posts
// @version 1
// @author STW
// @match https://www.facebook.com/
// ==/UserScript==
unsafeWindow.deletedPost = [];
unsafeWindow.deletedPostOwner = [];

【Ethereum 智能合約開發筆記】:編譯和部署合約的第一種姿勢 - 使用 Remix

Remix

之前有自己開發過 Ethereum 智能合約,但沒有好好紀錄開發的過程和碰到的問題,覺得滿可惜。這次想重新開始,從最傻的姿勢開始,一步步成長。本篇希望將一個很簡單的代幣合約(只能發行和轉帳),部署在本地和測試網路上,並測試其功能。教練,我”只”想學Solidity 這篇也是用 Remix 和 MetaMask 部署合約到測試網路,已經瞭解這篇應該可以直接 end。本篇是較詳細描述使用 Remix 的步驟及使用上可能碰到的問題。

開發環境

不需要安裝,直接在任何瀏覽器開啟 Remix

API Documents

[TOC]

API Documents HackMD

Server

  • To run https server
    # python3 manage.py runsslserver 10.0.2.15:8000 --certificate /home/user/cert_file/cert.pem --key /home/user/cert_file/key.pem
@DF-wu
DF-wu / index.js
Created February 15, 2019 18:51 — forked from edokeh/index.js
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#pragma warning( disable : 4996 )
/* i wrote
int divide(int all, int *arr,int len_front, int len_rear)
{