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
pipeline { | |
agent any | |
parameters { | |
string(name: "myStringParam", description: "String Parameter") | |
choice(choices: ["Choice 1", "Choice 2"], name: "myChoiceParam", description: "Choice Parameter") | |
booleanParam(defaultValue: false, name: "myBooleanParam", description: "Boolean Parameter") | |
} | |
environment { |
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
# jenkins | |
docker run -d -p 8081:8080 \ | |
-p 50000:50000 \ | |
--name jenkins \ | |
-v jenkins-vol:/var/jenkins_home \ | |
jenkins/jenkins:lts |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#include <stdio.h> | |
int ack(int m, int n) | |
{ | |
int ans; | |
if (m == 0) ans = n + 1; | |
else if (n == 0) ans = ack(m - 1, 1); | |
else ans = ack(m - 1, ack(m, n - 1)); | |
return (ans); | |
} |
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
const targetMap = new WeakMap() | |
let activeEffect = null | |
function track(target, key) { | |
let depsMap = targetMap.get(target) | |
if (!depsMap) { | |
targetMap.set(target, (depsMap = new Map())) | |
} |
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 | |
# Getting Ready | |
LOGDIR="~/log" | |
DOTFILES="~/.dotfiles" | |
# Update & Upgrade | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
# Setup Prerequisite |
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
// from Crockford's talk: https://www.youtube.com/watch?v=ya4UHuXNygM | |
function Y(le) { | |
return (function (f) { | |
return f(f) | |
}(function (f) { | |
return le(function (x) { | |
return f(f)(x) | |
}) | |
})) | |
} |
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
const downloader = function (url, filename) { | |
// change these two variables | |
if (!url) throw new Error('url is needed!') | |
filename = filename || 'newfile' | |
fetch(url) | |
.then(res => res.blob()) | |
.then(blob => { | |
const url = URL.createObjectURL(blob) | |
const anchor = document.createElement('a') |
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
# taobao mirror | |
npm config set registry https://registry.npm.taobao.org/ | |
npm config set disturl https://npm.taobao.org/mirrors/node/ | |
# thrid-party module | |
MIRROR_HOST=https://npm.taobao.org/mirrors | |
npm config set sass_binary_site $MIRROR_HOST/node-sass/ | |
npm config set sharp_dist_base_url $MIRROR_HOST/sharp-libvips/ | |
npm config set electron_mirror $MIRROR_HOST/electron/ | |
npm config set puppeteer_download_host $MIRROR_HOST/puppeteer/ |
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
"use strict"; | |
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } } | |
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | |
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } |
NewerOlder