Skip to content

Instantly share code, notes, and snippets.

View mactive's full-sized avatar
🎯
Focusing

mactive mactive

🎯
Focusing
View GitHub Profile
translucent gradient c4d octane render Rounded rectangle button on the front,playrix,Q,cute,bright,Translucent glass texture green button, high saturation bright green, writing substance,realistic painting style,8k, concept art, artstation glass rectangular soap smooth surface rounded corners transparent ios16 theme style icon, glass mobile phone butler shield 3D design, elegant color, simple fashion, laboratory style, nice color, fine details, 4K HD, 3D rendering, laboratory glass, 10 ICONS front of view transparent cubes made by metalic degrade pink blue green gold crystal, soft light , 8k octane render, realistic, detailed award winning, 3D render logo, Apple design, logo design, high end logo, tech, iridescent colors, sleek, reflective surface Iridescent glass supercomputer, mysterious light abstract geometric object, glass, black background 3 abstract colorful glass balls interconneccting and creating one giant sphere, glass reflections, high quality, 4k, hyper realistic. desktop app icon, web browser, 3
extension Bundle {
public func decode<T: Decodable>(_ type: T.Type,
from file: String,
dateDecodingStategy: JSONDecoder.DateDecodingStrategy = .deferredToDate,
keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy = .useDefaultKeys) -> T {
guard let url = self.url(forResource: file, withExtension: nil) else {
fatalError("Failed to locate \(file) in bundle.")
}
guard let data = try? Data(contentsOf: url) else {
fatalError("Failed to load \(file) from bundle.")
@mactive
mactive / batch.sh
Last active September 22, 2021 23:59
download_stream.js
#!/bin/bash
for i in {1..5}
do
echo "Welcome $i times"
node ./download.js
md5 2.zip
rm 2.zip
echo "=========end $i ========"
done
PandasLearning
@mactive
mactive / MySQL_5-7_macOS.md
Created July 16, 2020 23:21 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@mactive
mactive / README.md
Created March 4, 2020 19:50 — forked from chuyik/README.md
macOS 给 Git(Github) 设置代理(HTTP/SSH)
@mactive
mactive / Podfile
Created November 8, 2018 06:55
podfile on reactnative 0.57.4
platform :ios, '9.0'
target :bee_shell do
# React Native libraries
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
let existed = [];
function deepcopy(d) {
let result = Array.isArray(d) ? [] : {};
const keys = Object.keys(d);
if(keys && keys.length > 0) {
keys.forEach( key => {
result[key] = deepcopy(d[key]);
})
} else {
console.log(d)
@mactive
mactive / ActionSheetDemo.js
Created August 9, 2017 02:14
react-native-actionsheet
/**
* mengqian02 20170615
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
TouchableOpacity,
} from 'react-native';