Skip to content

Instantly share code, notes, and snippets.

View scplay's full-sized avatar
🏠
Working from home

ZeonWang scplay

🏠
Working from home
View GitHub Profile
@yihong0618
yihong0618 / shanbay_decode.js
Created November 30, 2020 07:08
shanbay decode
class Func {
static loop(cnt, func) {
'v'
.repeat(cnt)
.split('')
.map((_, idx) => func(idx));
}
}
@scplay
scplay / .bash_profile
Last active September 27, 2023 09:30
zeon util alias / shell func
# curl -L https://bit.ly/2Zc29Bd >> ~/.bashrc
# copy this to windows git bash ~/.bashrc file
# for iterm2
# curl -L https://bit.ly/2Zc29Bd >> ~/.zshrc
alias szp='test -f ~/.zeon_profile.sh && . ~/.zeon_profile.sh'
urc() {
# updateZeonProfile
profile_url="https://gist.githubusercontent.com/scplay/5e2b68133f2a0486596f25fa45fc4c18/raw/.zeon_profile.sh?t=$(date +%s)"
@idettman
idettman / add-to-existing-namespaces.js
Last active July 19, 2024 05:44
JavaScript: JSDoc Advanced Tips
/* https://leahayes.wordpress.com/2011/08/28/documenting-javascript-with-jsdoc3/
Namespaces can still be documented when a more abstract mechanism is used. @lends allows members to be added to an existing namespace:
*/
/**
* Root namespace
* @namespace root
*/
$namespace('root', /** @lends root **/ {
/**
@mttmzr
mttmzr / is-truncated.js
Last active February 1, 2022 05:23
Simple javascript function to check if an element is truncated.
/**
* Check if an element is truncated.
*
* CSS to be used:
* .truncate {
* width: 250px;
* white-space: nowrap;
* overflow: hidden;
* text-overflow: ellipsis;
* }
@lotreal
lotreal / install-vagrant-vbguest.sh
Last active October 6, 2023 10:26
解决中国局域网中 vagrant plugin install vagrant-vbguest 出错的问题
#!/usr/bin/env bash
GEMS=$(cat <<EOF
childprocess-0.5.8.gem
ffi-1.9.10.gem
little-plugger-1.1.4.gem
micromachine-1.1.0.gem
multi_json-1.11.1.gem
net-ssh-2.9.2.gem
rest-client-1.6.9.gem
@staltz
staltz / introrx.md
Last active July 19, 2024 22:21
The introduction to Reactive Programming you've been missing
@ralphcrisostomo
ralphcrisostomo / xampp_proxy_server_config
Created November 8, 2012 02:37
XAMPP Proxy Server Config
1. Open /Applications/XAMPP/etc/httpd.conf
2. Enable the following Modules by removing the # at the front of the line.
- LoadModule rewrite_module modules/mod_rewrite.so
- LoadModule proxy_module modules/mod_proxy.so
- LoadModule proxy_http_module modules/mod_proxy_http.so
3. Copy and Paste below to the bottom of httpd.conf
# Implements a proxy/gateway for Apache.
@LeZuse
LeZuse / Javascript-base.sublime-snippet
Last active March 20, 2023 16:52
Sublime Text Javascript snippets
<snippet>
<content><![CDATA[base(this, '${1:method}'${2});${0}]]></content>
<tabTrigger>base</tabTrigger>
<scope>source.js</scope>
<description>Base method call</description>
</snippet>