First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
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
{ | |
"name": "split-yaml", | |
"version": "1.0.0", | |
"main": "split-yaml.js", | |
"scripts": { | |
"split": "node split-yaml.js" | |
}, | |
"dependencies": { | |
"js-yaml": "^3.14.0", | |
"readline": "^1.3.0" |
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
productivity: | |
brightness: 100 | |
light_color: 233 | |
energy: | |
brightness: 100 | |
light_color: 156 | |
chill: | |
brightness: 57 | |
light_color: 447 | |
read: |
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
package dslab.DMTP; | |
import dslab.entities.Message; | |
import dslab.entities.User; | |
import java.io.*; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.net.Socket; | |
import java.util.ArrayList; |
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
-- source: https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e | |
CREATE DATABASE yourdbname; | |
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass'; | |
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser; |
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 | |
# | |
# !!! IMPORTANT !!! | |
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144) | |
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active | |
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though. | |
# | |
# If you are new to arch, I encourage you to at least read and understand what | |
# this script does befor blindley running it. | |
# That's why I didn't make a one-liner out of it so you have an easier time |
NewerOlder