Skip to content

Instantly share code, notes, and snippets.

View ineo6's full-sized avatar
🎯
Focusing

ineo6 ineo6

🎯
Focusing
View GitHub Profile
@nicerobot
nicerobot / README.md
Last active June 18, 2024 19:46
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@nasirkhan
nasirkhan / zip-split-unzip.md
Last active December 21, 2023 16:26
Split a Zip file and combine and unzip next linux

You have existing.zip but want to split it into 50M sized parts.

zip existing.zip --out new.zip -s 50m

will create

new.zip

d3js Tree Visualizer with Search, Panning, Expand and Collapse

Overview

This example pulls together various examples of work with trees in D3.js. See the d3js Tree Visualizer live here.

Features:

  • Expanding and collapsing nodes
  • Panning
@wohugb
wohugb / .npmrc
Last active February 3, 2022 06:25 — forked from tonyc726/.npmrc
河蟹加速npm/yarn的资源安装升级速度
registry="https://registry.npmmirror.com"
disturl="https://npmmirror.com/dist"
nvm_nodejs_org_mirror="https://npmmirror.com/mirrors/node"
nodejs_org_mirror="https://npmmirror.com/mirrors/node"
sass_binary_site="https://npmmirror.com/mirrors/node-sass"
electron_mirror="https://npmmirror.com/mirrors/electron/"
SQLITE3_BINARY_SITE="https://npmmirror.com/mirrors/sqlite3"
profiler_binary_host_mirror="https://npmmirror.com/mirrors/node-inspector/"
node_inspector_cdnurl="https://npmmirror.com/mirrors/node-inspector"
selenium_cdnurl="https://npmmirror.com/mirrors/selenium"
/**
* For Google Voice
* @Author zbinlin <zbinlin@outlook.com>
*/
var sleep = delay => new Promise(resolve => setTimeout(resolve, delay));
var composeClick = function x(btn) {
var rect = btn.getBoundingClientRect();
var x = Math.floor(rect.clientX + rect.width * Math.random());
var y = Math.floor(rect.clientY + rect.height * Math.random());
@lakoilija
lakoilija / readme.txt
Created September 2, 2020 10:57
best game 1.exe (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@yulijia
yulijia / .git-commit-blog.txt
Last active August 6, 2020 14:59 — forked from Linell/.git-commit-template.txt
git commit template in Chinese
# Type(<scope>): <subject>
# <body>
# <footer>
# type字段
# add 增加新博客/页面(add new post/page)
# correct 改错别字/语法(correct spelling/grammar )
# update 更新内容(update content)
@clinyong
clinyong / build.js
Created March 11, 2016 15:38
webpack build script.
import webpack from 'webpack'
import config from './webpack'
import swig from 'swig'
import fs from 'fs'
function writeTemplate (name) {
let sourceTemplate = config.templatePath + '/prod.tmpl'
let targetTemplate = config.buildTemplatePath + '/index.tmpl'
let content = swig.renderFile(sourceTemplate, {name})
fs.writeFile(targetTemplate, content, err => {
@hyle
hyle / ko.utils.3.3.0.signatures.js
Last active April 9, 2019 13:08
KnockoutJS 3.3.0 utils (ko.utils) signatures
// knockout 3.3.0
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ }
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ }
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }