Skip to content

Instantly share code, notes, and snippets.

@maxis1718
maxis1718 / a-vs-button.md
Last active January 16, 2018 10:02
the difference between <a> and <button>

<a><button> 有什麼不一樣

先看 Demo

套上 css 之後,幾乎看不出哪個是 <a> 哪個是 <button>

那為什麼還需要用不同的 tags?全部用 <div> 然後卯起來刻 css 不就好了?

Semantics

圖片壓縮盲測

1A 1B
![origin][dev-section-l-1] ![lossy][dev-section-l-2]
2A 2B
![lossy][dev-section-m-2] ![origin][dev-section-m-1]
"use strict";
(function(window) {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame =
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
}
@maxis1718
maxis1718 / tmux.conf
Created June 7, 2017 04:20 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
/*
* 1. Go to this facebook page: https://www.facebook.com/settings?tab=applications
* 2. open console
* 3. paste the following script
*/
const CONFRIM_SELECTOR = '.pop_container_advanced .dialog_buttons .uiButtonConfirm input';
const kill = (badGuys) => {
// ------------------------------------------------------ //
// (1) Object function with `prototype`
// ------------------------------------------------------ //
var Pokemon = function (pokemonName) {
this.name = pokemonName;
};
Pokemon.prototype.bark = function () {
console.log("Hey, I'm " + this.name); // this here refers to "Pokemon"
@maxis1718
maxis1718 / 踹共 Chuai Gong Bot.md
Last active July 14, 2016 06:56
[2016 Q3 Bot Challenge] 踹共 Chuai Gong Bot 簡易使用說明

踹共 Chuai Gong Bot 簡易使用說明

facebook_chat_app

post

{
	"_id" : ObjectId("563b17bef26ec7b20aabe962"), // auto-created by mongodb
	"push" : 26,
	"full_title" : "[正妹] 又正又會讀書",
	"tag" : "正妹",
	"title" : "又正又會讀書",
	"url" : "https://www.ptt.cc/bbs/Beauty/M.1446701090.A.658.html",

BootCamp

爆改

installer

  • 解法
  • 步驟
    1. 先抓 InstEd
    2. BootCamp/drivers/apple 裡找到 bootcamp64.msi
  1. 去 table entry 把 "LaunchCondition" 從安裝檔移掉