This file contains hidden or 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
| {"name":"yarn-publish","version":"0.0.0","bin":"./yarn-publish.sh"} |
This file contains hidden or 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/bash | |
| parse_yaml() { | |
| local yaml_file=$1 | |
| local prefix=$2 | |
| local indentUnit=${3:-2} | |
| local s="[[:space:]]" | |
| local w="[a-zA-Z0-9_]" | |
| awk ' |
This file contains hidden or 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
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Text.RegularExpressions; | |
| namespace ConsoleApp | |
| { | |
| internal class Program | |
| { |
This file contains hidden or 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 { Col, DatePicker, Row } from 'antd' | |
| import moment from 'moment' | |
| import { arrayOf, func, instanceOf, string } from 'prop-types' | |
| import React, { useEffect, useRef, useState } from 'react' | |
| const isSameDate = (date1, date2) => | |
| date1 === date2 || (date1 && date1.isSame(date2)) | |
| const isSameDateRange = (range1, range2) => | |
| isSameDate(range1[0], range2[0]) && isSameDate(range1[1], range2[1]) |
This file contains hidden or 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
| #!/usr/bin/env node | |
| const inquirer = require('inquirer') | |
| const git = require('simple-git/promise') | |
| ;(async () => { | |
| const repo = git() | |
| const { branches } = await repo.branchLocal() | |
| const branchNames = Object.values(branches).map(b => b.name) | |
| const { willDeleteBranches } = await inquirer.prompt([ |
This file contains hidden or 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
| (function initDocumentReadyListener() { | |
| var ie = !!(window.attachEvent && !window.opera); | |
| var wk = /webkit\/(\d+)/i.test(navigator.userAgent) && (RegExp.$1 < 525); | |
| var fn = []; | |
| var run = function () { for (var i = 0; i < fn.length; i++) fn[i](); }; | |
| var d = document; | |
| d.ready = function (f) { | |
| if (!ie && !wk && d.addEventListener) return d.addEventListener('DOMContentLoaded', f, false); | |
| if (fn.push(f) > 1) return; | |
| if (ie) { |
This file contains hidden or 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 React from 'react' | |
| export default function createAsyncComponent(loader, options = {}) { | |
| const { Placeholder } = options | |
| let Component | |
| return class AsyncComponent extends React.Component { | |
| static load() { | |
| return loader().then(ResolvedComponent => { | |
| Component = ResolvedComponent.default || ResolvedComponent | |
| }) |
This file contains hidden or 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 React from 'react' | |
| import ReactDOM from 'react-dom' | |
| import { object, string } from 'prop-types' | |
| import isEqual from 'lodash/isEqual' | |
| import Knob from '@app/components/dumbs/knob' | |
| function createNgComponent(ReactComponent) { | |
| const propTypes = { | |
| className: string, |
This file contains hidden or 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
| # ======================== | |
| # 1. Clone and build emsdk | |
| # ======================== | |
| # /> | |
| git clone https://github.com/juj/emsdk.git | |
| cd emsdk | |
| ./emsdk install --build=Release sdk-incoming-64bit binaryen-master-64bit | |
| ./emsdk activate --global --build=Release sdk-incoming-64bit binaryen-master-64bit |
This file contains hidden or 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
| # ======================= | |
| # 1. Clone and build LLVM | |
| # ======================= | |
| # /> | |
| gcc -v | |
| make -v | |
| cmake --version | |
| brew install cmake | |
| xcode-select --install |
NewerOlder