Skip to content

Instantly share code, notes, and snippets.

View yangjunjun's full-sized avatar
🐱
Focusing

杨军军 yangjunjun

🐱
Focusing
  • undefined
  • Xian, Shaanxi, China
View GitHub Profile
@loilo
loilo / pass-slots.md
Last active March 27, 2024 20:58
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@dofy
dofy / ve2x.date.user.js
Last active January 26, 2016 06:43
显示 v2ex 绝对时间
// ==UserScript==
// @name v2ex 绝对时间
// @namespace http://phpz.org/
// @version 0.1.5
// @description 显示 v2ex 中的绝对时间
// @author Seven Yu
// @match *.v2ex.com/*
// @run-at document-end
// @grant none
// @updateURL https://gist.github.com/dofy/38c8d67405a5597f4e7e/raw
@dexteryy
dexteryy / standards_for_webapps_on_mobile.md
Last active August 17, 2017 02:16
W3C Standards for Web Apps on Mobile (After HTML5)
@finscn
finscn / checkSequence
Last active August 29, 2015 13:57
检测 两组任意(不限个数 不限花色) 的扑克牌, 混到一起后能否构成任意长度(大于1 小于15)的顺子.A代表1或14,小王代表1--5,大王代表1--14
/*
检测 两组任意(不限个数 不限花色) 的扑克牌, 混到一起后能否构成任意长度(大于1 小于15)的顺子.
A可表示1或14,小王可表示1--5,大王可表示1--14
说明:
1 我微博里说 小王代表 1到9有误, 我这边实际遇到的场景是 小王代表 1--5 (当然 这个无所谓)
2 牌是可以有重复的 : 例如 可以 4个小王 9个大王 等等, 可以理解为是从无数副扑克牌当中随意抽取出两组
3 组成的顺子 可以不是5张 , 其实严格说 就是 等差为1的等差数列
4 能且只能组成一组顺子, 组成顺子后, 牌没有剩余
@17
17 / init.bat
Last active August 23, 2022 03:36
Cmder explorer context menu integration
@echo off
SET CMDER_ROOT=%~dp0
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder" /ve /d "Cmder Here" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder" /v "Icon" /d "\"%CMDER_ROOT%cmder.exe\"" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder" /v "Extended" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder\command" /ve /d "\"%CMDER_ROOT%cmder.exe\" \"%%V\"" /f
pause
@missett
missett / JS Quicksort
Created October 24, 2013 11:47
Recursive Quicksort implementation in JS
function quicksort(input) {
if(input.length === 0) return input;
var head = input[0],
tail = input.slice(1);
var less = tail.filter(function(i) {
return i < head ? true : false;
});
@cmartinbaughman
cmartinbaughman / GoogleHackMasterList.txt
Last active April 17, 2024 14:57
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www&#8221; domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@wintercn
wintercn / HTMLLexicalParser.js
Last active August 5, 2019 11:16
HTML语法分析器模型
function StartTagToken(){
}
function EndTagToken(){
}
function Attribute(){
}
@wintercn
wintercn / showboxes.js
Created May 21, 2013 06:34
显示页面的盒结构
function randomColor(){
return "rgb("+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+")";
}
function showBoxes(window) {
var rects = [];
function getRects(node){
var range = window.document.createRange();
range.setStartBefore(node);
range.setEndAfter(node);
@paranoidxc
paranoidxc / V2EX.user.js
Last active December 14, 2015 09:28
固定 V2EX 的导航栏, 双击导航栏页面回到顶部,每日自动签到。
// ==UserScript==
// @author iParanoid
// @name V2EX_User_Script
// @namespace https://zone-huangxc.rhcloud.com
// @description Position fixed the navigation , Scroll to top when double click navigation bar or Page Footer
// @include *
// @updateURL https://gist.github.com/paranoidxc/5065236/raw/10bc3ee7501b86f2e579657ef64348e642cc2a70/V2EX.user.js
// ==/UserScript==
function iparanoid_wrapper() {