Skip to content

Instantly share code, notes, and snippets.

View sko00o's full-sized avatar
☮️
Peaceful.

Wenyu.Li sko00o

☮️
Peaceful.
View GitHub Profile
@sko00o
sko00o / install-postgresql-on-centos7.md
Last active November 18, 2019 07:57
[Install PostgreSQL on CentOS7] #postgresql #CentOS7

Install PostgreSQL on CentOS7

Installation

if you want install latest version check official site

# will install postgres9
sudo yum install postgresql-server postgresql-contrib
sudo postgresql-setup initdb
@sko00o
sko00o / create-list.sh
Last active April 16, 2020 15:34
[My Arch Linux software list] #ArchLinux #pacman
sudo pacman -Qqte | >> pacman.txt
@sko00o
sko00o / main.go
Last active November 18, 2019 07:54
[RSA in Go] RSA snippet write in Go #Go #RSA
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/base64"
"encoding/pem"
"errors"
"fmt"
@sko00o
sko00o / RepeatKiller.py
Created August 4, 2018 02:12
RepeatKiller.py
# -*- coding: utf-8 -*-
# Author: SKo00o
def kill(str):
p = 'X'
o = []
f = False
for x in str:
if x != p:
@sko00o
sko00o / ImportFile.py
Created December 13, 2017 02:50
ImportFile.py
# -*- coding: utf-8 -*-
# Author: SKo00o
'''
Use for import script file to pythonista.
Add this script in pythonsta’s Share Extention Shortcuts.
'''
import appex
import os
import console
@sko00o
sko00o / FixCode.py
Created December 13, 2017 02:43
FixCode.py
# -*- coding: utf-8 -*-
# Author: SKo00o
'''
Format Code use pep8 in pythonista.
1. Install StaSh
2. Run following code in StaSh:
pip install autopep8
3. Add this Script in pythonista's shortcut
'''
@sko00o
sko00o / ChatWithRobot.py
Created November 27, 2017 16:50
ChatWithRobot.py
import requests
import json
# 你无聊的时候可以找个机器人聊天啊……
def talkwithrobot(str):
say = str
via = 'http://op.juhe.cn/robot/index?info='+say+'&key=df2c3195b69b9c9fce3678698edc80a2'
res = requests.request('GET',via).json()
res2 = res['result']['text']