Skip to content

Instantly share code, notes, and snippets.

View laosb's full-sized avatar
⚔️
Public attention is a double-edged sword.

Shibo Lyu laosb

⚔️
Public attention is a double-edged sword.
View GitHub Profile

危机8.1

CNNIC接国务院指令,取缔360互联网基础设施提供商的运营资格,查处奇智科技旗下北京360站长服务有限公司。对其股东处以500万元的行政罚款。

危机10.1

新华网发布评论员文章《中国互联网安全如何掌握在自己手中》,提出政府应该建立唯一且统一的互联网安全体系,将互联网安全收归国有,有利于维护国家安全。

mili | sharists 16:01:34
mili | sharists 16:01:34
好玩?
mili | sharists 16:01:51
有意思?
-Laosb8丶 16:01:52
If you do think so, that's it
mili | sharists 16:02:22
I don’t think so
### Keybase proof
I hereby claim:
* I am laosb on github.
* I am laosb (https://keybase.io/laosb) on keybase.
* I have a public key whose fingerprint is 8DF5 11B3 BA91 A62E 7757 E6B7 AC1D F8AB 4942 72EC
To claim this, I am signing this object:
@laosb
laosb / store_index.js
Last active August 13, 2017 09:49
How we connect to backend accounts system on Nuxt.js
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = () => new Vuex.Store({
state: {
_currentUser: null, // Will use later
_clientId: null
@laosb
laosb / layouts_default_vue.js
Last active August 13, 2017 05:49
How we connect to backend accounts system on Nuxt.js
import axios from 'axios'
export default {
components: { /* Some components */ },
beforeMount() {
//We set this on nuxtServerInit. In this way we get clientId from server.
if (this.$store.state._clientId) {
console.log('found clientId from server:', this.$store.state._clientId)
const bc = require('browser-cookies')
bc.set('__client_id', this.$store.state._clientId, { domain: 'example.com' })
@laosb
laosb / layouts_user-dropdown_vue.js
Created August 13, 2017 10:27
How we connect to backend accounts system on Nuxt.js
import axios from 'axios'
export default {
methods: {
async login() {
const data = await axios.post('https://example.com/api/login', {
username: this.$refs.username.value,
password: this.$refs.password.value
})
if (!data.err) {
https://press.one/p/v?s=c68037ddb531ce7aa32fa18d83e4d7d65ea8a9d3271f35b8cdb89ada8e64ff59c649383d639b03abb597684ebcece19646b6dac5c882efb7c1db4e64c0d1e5420&h=3853d0b19cebea473c331846fb9668c424ea3b6ace300f73ae44b71b13210e2d&a=a652d79e3704e3afdf298efbf81dc11a003f59d3&f=P1&v=3
@laosb
laosb / jsonBinApi.js
Created July 8, 2020 13:28
Simple API wrapper for JSONBin.io.
import fetch from 'node-fetch'
const secretKey = process.env.JSONBIN_SECRET_KEY
const basicHeaders = () => ({
'Content-Type': 'application/json',
'X-Master-Key': secretKey,
})
export const createBin = async (
@laosb
laosb / default.custom.yaml
Last active October 8, 2022 03:43
Rime configuration
# To use rime-install:
#
# curl -fsSL https://raw.githubusercontent.com/rime/plum/master/rime-install | bash
#
# To install emoji support:
#
# plum/rime-install emoji
# plum/rime-install emoji:customize:schema=bopomofo
patch: