Skip to content

Instantly share code, notes, and snippets.

View lixuanh's full-sized avatar
🏠
Working from home

Hai lixuanh

🏠
Working from home
View GitHub Profile
@lixuanh
lixuanh / phpcs.xml
Last active February 14, 2018 03:52
<?xml version="1.0"?>
<ruleset name="CodingStandard">
<description>Coding standard. PSR2 with tabs instead of spaces.</description>
<exclude-pattern>\.git</exclude-pattern>
<exclude-pattern>*/Config/*.ini.php</exclude-pattern>
<exclude-pattern>/*/tmp/</exclude-pattern>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
# execfile("./sendmail.py")
import smtplib
from email.mime.text import MIMEText
import socket
socket.setdefaulttimeout(None)
HOST = "smtp.gmail.com"
PORT = "587"
sender= input('Mail Address: ')
password = input('Password: ')
<script type="text/javascript">
// Ajax通信を開始する
jQuery.ajax({
url: '/url/to/target',
async: true, // 非同期、デフォルト値:「true」
cache: true, // デフォルト値「true」、dataTypeは'script'と'jsonp'の場合は「false」
data: data, // 送信するデータ
dataType: 'json', // 「json」を指定するとresponseがJSONとしてパースされたオブジェクトになる
}).done(function (response) {
// ステータスコードは正常で、dataTypeで定義したようにparse出来たとき
window.vue = new Vue({
// ...
created() {
this.$root.$on('gmo_multipayment_result',(res) => {
_component.exec_purchase(res);
});
},
methods() {
gmo(){
Multipayment.init(GmoApikey);

gitコマンドメモ

init a repo/新規

cd [ローカルリポジトリのパス]
git init
git add * // 全部追加
git commit -m "initial commit" // コメント

clone/クローン

Sub UnhideAllSheets()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
End Sub
$(".button").click(function(){
$("#formFile").click();
});
$("#formFile").change(
function(){
var fm = document.getElementById('fileUpForm');
var fd = new FormData(fm);
var imagepath = null;
UploadFile(fd);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;" >
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("gdata", "1.1");
google.setOnLoadCallback(getMyBlogFeed);
google.accounts.user.login();
//设置跳转按钮启动浏览器
open_web.setOnClickListener(new TextView.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.randinblogger.blogspot.com"));
startActivity(intent);
MyActivity.this.onPause();
}
});