Skip to content

Instantly share code, notes, and snippets.

View EmbraceLife's full-sized avatar
🎯
baby

深度碎片 EmbraceLife

🎯
baby
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EmbraceLife
EmbraceLife / setup_conda.sh
Created May 15, 2022 04:49
The final step to get mamba ready: init the mamba
#!/usr/bin/env bash
set -eou pipefail
# case "$OSTYPE" in
# darwin*)
# case $(uname -m) in
# arm64) DOWNLOAD=https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh; ;;
# *) DOWNLOAD=https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh; ;;
# esac ;;
# linux*) DOWNLOAD=https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh; ;;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>d3-selection</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
@EmbraceLife
EmbraceLife / d3-selection.md
Last active November 16, 2019 07:52
d3-selection
<title>d3-selection</title>
[{"time": 1540051200, "summary": "Possible drizzle in the afternoon and evening.", "icon": "rain", "sunriseTime": 1540074624, "sunsetTime": 1540115236, "moonPhase": 0.4, "precipIntensity": 0.0028, "precipIntensityMax": 0.005, "precipIntensityMaxTime": 1540101600, "precipProbability": 0.69, "precipType": "rain", "temperatureHigh": 60.34, "temperatureHighTime": 1540119600, "temperatureLow": 58.84, "temperatureLowTime": 1540144800, "apparentTemperatureHigh": 59.67, "apparentTemperatureHighTime": 1540119600, "apparentTemperatureLow": 59.49, "apparentTemperatureLowTime": 1540144800, "dewPoint": 56.42, "humidity": 0.92, "pressure": 1020.77, "windSpeed": 4.42, "windGust": 5.84, "windGustTime": 1540101600, "windBearing": 351, "cloudCover": 0.71, "uvIndex": 5, "uvIndexTime": 1540098000, "visibility": 1.343, "ozone": 272.6, "temperatureMin": 56.62, "temperatureMinTime": 1540054800, "temperatureMax": 61.01, "temperatureMaxTime": 1540134000, "apparentTemperatureMin": 57.27, "apparentTemperatureMinTime": 1540054800, "appa
@EmbraceLife
EmbraceLife / gist:a4a1d4cdd2d5da50dfcc6d9b7492d37d
Created September 20, 2019 03:33
terminal error message by `./mach run --jsdebugger`
(base) ~/src-debugger/mozilla-central ./mach run --jsdebugger
0:00.65 /Users/Natsume/src-debugger/mozilla-central/obj-x86_64-apple-darwin18.7.0/dist/Nightly.app/Contents/MacOS/firefox --jsdebugger -no-remote -foreground -profile /Users/Natsume/src-debugger/mozilla-central/obj-x86_64-apple-darwin18.7.0/tmp/profile-default
1568947709554 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1568947709554 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1568947709555 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1568947709555 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
Debugger Server for
@EmbraceLife
EmbraceLife / bash
Created September 5, 2019 06:36
warning and error messages when doing quick setup for firefox debugger
(base) ~/Desktop curl -o- -L https://yarnpkg.com/install.sh | bash -s
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7148 0 7148 0 0 5503 0 --:--:-- 0:00:01 --:--:-- 5506
Installing Yarn!
/Users/Natsume/.nvm/versions/node/v12.9.1/bin/yarn
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
> Yarn is already at the 1.17.3 version.
(base) ~/Desktop git clone https://github.com/firefox-devtools/debugger.git
@EmbraceLife
EmbraceLife / gist:be15bec729cbac3b96040ccade88aefb
Created September 3, 2019 02:18
runWithDebugger added dependencies
(function createLibrarySystems(){
var libraryStorage = {};
function librarySystem(libraryName, dependenciesArray, callback){
if (arguments.length > 1){
if (dependenciesArray.length > 0) {
var dependencyLibs = dependenciesArray.map(function(dep){
return libraryStorage[dep];
})
<!DOCTYPE html>
<html>
<head>
<title>run with debugger</title>
</head>
<body>
<script src="../simpleTest.js"></script>
<script>
@EmbraceLife
EmbraceLife / torch_tensor_explore.ipynb
Created March 21, 2017 02:22
Experiment torch.tensor
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.