Skip to content

Instantly share code, notes, and snippets.

View shuiRong's full-sized avatar
👻
Working

shuirong shuiRong

👻
Working
View GitHub Profile
@shuiRong
shuiRong / cloudSettings
Last active May 22, 2020 09:36
vsc config Settings Sync插件同步
{"lastUpload":"2020-05-22T09:35:51.187Z","extensionVersion":"v3.4.3"}
@shuiRong
shuiRong / go
Last active August 25, 2023 10:17
Go Telegram Bot DEMO
package main
import (
"fmt"
"log"
"net/http"
"net/url"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
"golang.org/x/net/proxy"
@shuiRong
shuiRong / shell
Created May 2, 2020 09:54
ffmpeg 视频 转 音频 mp4 to mp3 视频 转 mp3 脚本
#!/bin/bash
#Program:
# convert flv to mp3
#History:
# #2013/07/02 lazybios@gmail.com First release
# PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/ffmpeg/bin
# export PATH
# 得先创建一个mp3文件夹
@shuiRong
shuiRong / bug
Last active January 3, 2020 14:53
奇怪的移动端Bug
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="robots" content="all" />
<style type="text/css">
@shuiRong
shuiRong / JS
Created August 19, 2019 06:15
腾讯笔试:解码字符串(HG[12|ASD]FF)
let done = false
const calculate = str => {
if (done) {
return ''
}
// 去除首尾[]
if (/^\[/.test(str)) {
str = str.replace(/^\[/, '').replace(/\]$/, '')
}
@shuiRong
shuiRong / CSS
Created June 2, 2019 09:42
简书页面显示:系统维护中,图片暂时无法加载 的解决办法
1. 打开浏览器控制台
2. 输入下面的代码
3. 即可正常显示图片
```
$('img.image-loading').each(function() {
let image = $(this)
let parent = image.parent().parent()
parent.empty();
image.attr("src",image.attr("data-original-src"))
@shuiRong
shuiRong / DEMO
Created February 24, 2019 07:20
Example01
// App.js (new project)
import React, { Component } from 'react'
import { View, FlatList, Text } from 'react-native'
import ScrollableTabView, {
DefaultTabBar
} from 'react-native-scrollable-tab-view'
class List extends Component {
render() {
// 模拟列表数据
@shuiRong
shuiRong / JS
Created February 1, 2019 09:56
随机生成十六进制的颜色值
'#' + Math.floor(Math.random() * 16777215).toString(16)
@shuiRong
shuiRong / gist:36b95ee1ca8670e1b0ea1f360d21f3a9
Last active May 31, 2019 05:13
unicode的两种表现
unicode的表示方式有两种,一种为web页面中使用的,一种为我们一般采用的编码方式
第一种:"&#25104;&#37117; "Unicode编码方式 &+编号是网页里引用unicode字符的方法,编号为十进制的在unicode中的编号
第二种:\u6210\u90fd 表示的也是成都,采用的也是unicode编码格式,是java编程中使用的编码格式
它以\u开头,后接四位16进制的数。
js获取字符的unicode码: '测'.charCodeAt(0)
@shuiRong
shuiRong / gist:0d163edfd9a17dfe32106d69983ccdf1
Last active December 22, 2018 14:29
ReactNative使用mobx的装饰器语法,相关配置
It's my setting: (works for me)
devDependencies
```
...
"@babel/plugin-proposal-decorators": "^7.2.2",
"metro-react-native-babel-preset": "0.50.0",
"babel-preset-mobx": "^2.0.0",
"jsc-android": "^236355.1.1",
"mobx": "^5.8.0",
"mobx-react": "^5.4.3",