Skip to content

Instantly share code, notes, and snippets.

View kewang's full-sized avatar
🎯
Focusing

Kewang kewang

🎯
Focusing
View GitHub Profile
@kewang
kewang / transform.js
Created April 11, 2020 14:05
Transform Xcode log to curl header and body
const buildHeaders = (str) => {
const headers = str
.split("\n")
.map((part) => {
const elem = part.split("=");
let key = elem[0].trim();
key = key.replace(/"/g, "");
package org.equit.jtf.base;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.MenuItem;
import android.widget.Toast;
user.name=kewang
[email protected]
core.editor=vi
color.diff=always
color.status=always
color.branch=always
color.ui=always
push.default=current
core.repositoryformatversion=0
core.filemode=true
@kewang
kewang / README.md
Last active July 11, 2024 07:44
git-tree

Windows 請開啟 Git Bash,Mac/Linux 請開啟 Terminal (終端機)。

總共有 5 個指令,每個指令輸入完之後請按下 enter,前方的 1.2.... 請勿輸入

1. mkdir ~/bin
2. curl -o- https://gist.githubusercontent.com/kewang/8c478078f2a98f32f5bcbfca1348a8a1/raw/0e99b8387d3c3e098111b6320036e8535b292ae4/git-tree > ~/bin/git-tree
3. curl -o- https://gist.githubusercontent.com/kewang/8c478078f2a98f32f5bcbfca1348a8a1/raw/0e99b8387d3c3e098111b6320036e8535b292ae4/wgit > ~/bin/wgit
4. chmod +x ~/bin/git-tree
5. chmod +x ~/bin/wgit
## html
<input name1>
<input pass1>
<button btn1>
<input name2>
<input pass2>
<button btn2>
@kewang
kewang / index.htm
Created July 1, 2019 13:48
hahow-git
<html>
<head>
<title>Hello</title>
<link rel="stylesheet" href="style/main.css">
</head>
<body>
<h1>大家好</h1>
<p class="red-color">這是測試文字</p>
</body>
Private Function calculate() As Double
Select Case Dropdown.SelectedItem
Case "+"
Return CDbl(TA.Text.Trim) + CDbl(TB.Text.Trim)
Case "-"
Return CDbl(TA.Text.Trim) - CDbl(TB.Text.Trim)
Case "*"
Return CDbl(TA.Text.Trim) * CDbl(TB.Text.Trim)
Case "/"
Return CDbl(TA.Text.Trim) / CDbl(TB.Text.Trim)
@kewang
kewang / 1.vb
Last active June 13, 2019 09:56
Protected Sub Repeater_leaveWrite_ItemDataBoundXXXXXXXXXX
' 前面照舊
Dim RadioButtonList_dayTime As RadioButtonList
RadioButtonList_dayTime = CType(e.Item.FindControl("RadioButtonList_dayTime"), RadioButtonList)
' 後面照舊
End Sub
/* Pure CSS3 Lightbox start */
a.button {
display: inline-block;
background: #999;
color: #f2f2f2;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
padding: 10px 1em;
-moz-box-shadow: 0 3px 0 #777;

1. 用 ASP.NET 寫表單操作

<asp:CheckBox id="myCheck" runat="server" />
<asp:Button id="test1" text="Check Checkbox" runat="server" />
<asp:Button id="test2" text="Uncheck Checkbox" runat="server" />

如果要用 ASP.NET 寫表單操作的話,必須要在 .vb 裡面做處理