bye bye testtest
View vendor-risk-stratification-questionnaire-part-of.md
Vendor Risk Stratification Questionnaire
Ref: https://docs.google.com/forms/d/e/1FAIpQLScoEwqevT6ncHWRBa2cHCJUhFOoOflUcrFAKVkxDTjsubST1Q/viewform
General Information
Vendor Name
Roundforest
View keepPREnvAlive.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# enable this if you want it fail early | |
# set -e | |
# pros: easy and cheap | |
# cons: you have to keep current working directory with unchanged branch (workaround: copy the repo) | |
gcurrentbranch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' |
View notionCommentParser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// modified ghParsePrSearch.js https://gist.github.com/liuderchi/a20952af0b26eca37ce9afab6875c365 | |
var comments = [ | |
...document.querySelectorAll('.notion-page-view-discussion')[0].firstElementChild.firstElementChild.children | |
].slice(0, -1); // remove empty one in the end | |
var res = comments | |
.map(div => { | |
const dateContent = div.children[1].children[0].children[1].textContent; | |
const dateString = dateContent.match(/(\d\d\/){2}\d{4}/i)?.[0] ? `@${dateContent.match(/(\d\d\/){2}\d{4}/i)?.[0]}` : '' |
View ghParsePrSearchResult.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example Page: https://github.com/liuderchi/atom-i18n/pulls?q=is%3Apr+is%3Aclosed | |
var res = [ | |
...document.querySelectorAll("div.Box-row.js-navigation-item.js-issue-row") | |
] | |
.map(rowEl => { | |
const title = rowEl.querySelector( | |
"a.link-gray-dark.v-align-middle.no-underline.h4.js-navigation-open" | |
).textContent; | |
const num = rowEl |
View surfingkeysConfig.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// trigger settings edit UI using `se` | |
// ref https://github.com/brookhong/surfingkeys#edit-your-own-settings | |
// unmap('gc', /github\.com/i ); | |
// unmap('gp', /github\.com/i ); | |
// https://github.com/brookhong/surfingkeys#properties-list | |
settings.blacklistPattern = /^https?:\/\/github\.com\/.?/; |
View tree_style_tab_firefox.md
AddOn:
- Go to about:support in your address bar
- Look for your profiles directory and open it:
- Create a file named
chrome/userChrome.css
in your profile directory:
View .graphqlconfig.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For Graphql Playground | |
# Steps in Toolbar: | |
# Workspace > New Workspace > select a folder containing this file | |
# | |
# example: https://github.com/prisma/graphql-playground/pull/757/files | |
# | |
# NOTE for .env | |
# prepare .env with following content, in same directory as .graphqlconfig.yml | |
# GH_TOKEN=paste-my-github-token-here | |
# AIA_TOKEN_LOCAL=paste-aia-token-here |
View medium-res-20180519.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
語法 | 包含 Non-Enumerable 屬性? | 包含原型鍊? | Note | |
---|---|---|---|---|
'name' in person | ✔️ | ✔️ | 範圍超過自己本身 | |
Object.getOwnPropertyNames(person) | ✔️ | no | ||
Object.keys(person) | no | no | Enumerable props ONLY | |
for (let x in person) | no | ✔️ | Enumerable props ONLY |
View guess_num.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getpass | |
def guess_num(guess, ans): | |
resA, resB = 0, 0 | |
for index, c in enumerate(guess): | |
findAnsRes = ans.find(c) | |
if findAnsRes == index: | |
resA += 1 | |
elif findAnsRes >= 0 : |
NewerOlder