most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
// namespace for the windows | |
var W = {}; | |
// namespace for custom UI | |
var UI = {}; | |
// store the tabs in this array for later use | |
var tabs = []; | |
// include the necessary files to run the app | |
Ti.include('ui.js'); | |
Ti.include('other.js'); | |
Ti.include('window1.js'); |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
Handlebars.registerHelper('pagination', function(currentPage, totalPage, size, options) { | |
var startPage, endPage, context; | |
if (arguments.length === 3) { | |
options = size; | |
size = 5; | |
} | |
startPage = currentPage - Math.floor(size / 2); | |
endPage = currentPage + Math.floor(size / 2); |
const glob = require('fast-glob'); | |
const info = require( 'npm-registry-package-info' ); | |
const paths = glob.sync('**/package.json', { | |
ignore: ['**/node_modules/**/package.json'], | |
deep: 5 | |
}); | |
paths.forEach(path => { | |
const { dependencies, devDependencies, peerDependencies } = require(`${process.cwd()}/${path}`); |
// change 'agent' lines as appropriate | |
pipeline { | |
agent none | |
stages { | |
stage('Run CI?') { | |
agent any | |
steps { |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.