Sidebar:
- Cmd-Shift-F: search
- Cmd-Shift-E: files
Navigating in current editor:
// Use like this: node --import logger.js yourapp.js | |
import path from 'path'; | |
const { log } = console; | |
[`debug`, `log`, `warn`, `error`, `table`, `dir`].forEach((methodName) => { | |
const originalLoggingMethod = console[methodName]; | |
console[methodName] = (...args) => { | |
const originalPrepareStackTrace = Error.prepareStackTrace; | |
Error.prepareStackTrace = (_, stack) => stack; |
import pandas as pd | |
import numpy as np | |
def get_dataset(size): | |
# Create Fake Dataset | |
df = pd.DataFrame() | |
df['size'] = np.random.choice(['big','medium','small'], size) | |
df['age'] = np.random.randint(1, 50, size) | |
df['team'] = np.random.choice(['red','blue','yellow','green'], size) | |
df['win'] = np.random.choice(['yes','no'], size) |
// 1. Shorten the console log | |
const log = console.log.bind(document) | |
log("does it work?") | |
log("yes") | |
log(5) | |
// 2. Merge two arrays into one | |
const array1 = ["One", "Two", "Three"] | |
const array2 = ["Four", "Five", "Six"] |
Entity,Code,Year,Coal (% of total),Nuclear (Rate),Natural gas (Rate),Oil (Rate),Hydroelectric (Rate),Other renewables (excluding hydro) (Rate) | |
Albania,ALB,1971,0,0,0,42.8571428571429,57.1428571428571,0 | |
Albania,ALB,1972,0,0,0,37.9310344827586,62.0689655172414,0 | |
Albania,ALB,1973,0,0,0,33.7837837837838,66.2162162162162,0 | |
Albania,ALB,1974,0,0,0,31.5789473684211,68.4210526315789,0 | |
Albania,ALB,1975,0,0,0,28.0898876404494,71.9101123595506,0 | |
Albania,ALB,1976,0,0,0,25.4901960784314,74.5098039215686,0 | |
Albania,ALB,1977,0,0,0,23.4782608695652,76.5217391304348,0 | |
Albania,ALB,1978,0,0,0,22.5806451612903,77.4193548387097,0 | |
Albania,ALB,1979,0,0,0,21.1678832116788,78.8321167883212,0 |
<div id="app"></div> | |
<script> | |
// fileA.js | |
let currentEffect | |
class Dep { | |
constructor() { | |
this.subscribers = new Set() | |
} |
URL Schemes | |
Apple | |
Apple Music — music://geo.itunes.apple.com/us/albums/<albumID> | |
– music://geo.itunes.apple.com/us/artists/<artistID> | |
Apple News — applenews:// | |
App Store — itms-apps://itunes.apple.com/app/<appID> | |
Apple TV — videos:// |
dialog { | |
position: fixed; | |
top: 50%; | |
left: 50%; | |
right: auto; | |
padding: 30px; | |
transform: perspective(500px) translate(-50%, -50%); | |
background: linear-gradient(to bottom, #FFF, #F4F4F4) #FFF; | |
border: none; | |
border-radius: 3px; |
Basics
docker version
docker info
docker login
docker logout
docker image ls
docker container ls --all