Skip to content

Instantly share code, notes, and snippets.

View JaysonHwang's full-sized avatar
🌴
On vacation

huangzhenjie JaysonHwang

🌴
On vacation
View GitHub Profile
@JaysonHwang
JaysonHwang / deep-merge-pure.js
Last active May 29, 2019 02:13 — forked from ahtcx/deep-merge.js
Deep-Merge JavaScript objects with ES6
const deepMergePure = (dst, src)=>{
const simpleClone = (jsonObj)=>{
return JSON.parse(JSON.stringify(jsonObj));
}
//////deep-merge.js start
const merge = (target, source) => {
// Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties
for (let key of Object.keys(source)) {
if (source[key] instanceof Object) Object.assign(source[key], merge(target[key], source[key]));
}
@JaysonHwang
JaysonHwang / php.rb
Last active May 4, 2023 00:36 — forked from jeroenoldenburger/php.rb
PHP 5.2 Formula for Homebrew
require 'Formulary'
def mysql_installed?
`which mysql_config`.length > 0
end
class Php < Formula
url 'http://museum.php.net/php5/php-5.2.17.tar.gz'
homepage ''
sha256 '1abe07c1fdd64184708a3ba179abcfcca5662a4e0d2037eb2748b75abc42e767'