Skip to content

Instantly share code, notes, and snippets.

ITGeeker alanljj

Block or report user

Report or block alanljj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alanljj
alanljj / xml_rpc.py
Created May 22, 2019 — forked from ilyasProgrammer/xml_rpc.py
Odoo xml rpc example
View xml_rpc.py
import xmlrpclib
from datetime import datetime
# url = "http://localhost:8069"
# db = "RAJO"
# username = 'a'
# password = 'a'
url = "https://erp.atlantis-kw.com"
db = "RAJO_TEST"
username = 'api'
@alanljj
alanljj / get_ver.sh
Created Apr 3, 2019
get linux version shell
View get_ver.sh
#!/bin/bash
Get_Dist_Name()
{
if grep -Eqii "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
DISTRO='CentOS'
PM='yum'
elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then
DISTRO='RHEL'
PM='yum'
elif grep -Eqi "Aliyun" /etc/issue || grep -Eq "Aliyun" /etc/*-release; then
@alanljj
alanljj / 身份证前6位地区代码
Created Mar 26, 2019
身份证前6位地区代码
View 身份证前6位地区代码
var GB2260 = {
"110000": "北京市",
"110100": "北京市市辖区",
"110101": "北京市东城区",
"110102": "北京市西城区",
"110103": "北京市崇文区",
"110104": "北京市宣武区",
"110105": "北京市朝阳区",
"110106": "北京市丰台区",
"110107": "北京市石景山区",
View 阿里云免费ssl的根证书
-----BEGIN CERTIFICATE-----
MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
View zimbra install aliyun free ssl.sh
#!/bin/bash
# Note: create by itgeeker
domain=mail.itgeeker.net
su - zimbra -c 'zmproxyctl stop'
su - zimbra -c 'zmmailboxdctl stop'
mkdir /opt/zimbra/ssl/aliyunssl/
echo "up load aliyun ssl other to this folder first !!!!!!!"
View Odoo人民币大写转换Python代码
# -*- coding: utf-8 -*-
###########################################################################
# GeekerMaster奇客大师 www.geekermaster.com
# Copyright 2018 ITGeeker <alanljj@gmail.com>
############################################################################
from openerp import models, fields, api
class GeekerRmbCapital(models.Model):
_name = 'geeker.rmb.capital'
_description = 'Geeker RMB Capital'
@alanljj
alanljj / cloudSettings
Last active Mar 12, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-03-12T13:48:31.077Z","extensionVersion":"v3.2.7"}
@alanljj
alanljj / wp-permissions-script
Created May 16, 2018 — forked from macbleser/wp-permissions-script
WordPress Permissions Configuration Script
View wp-permissions-script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # &lt;-- wordpress owner
WP_GROUP=changeme # &lt;-- wordpress group
WP_ROOT=/home/changeme # &lt;-- wordpress root directory
@alanljj
alanljj / lychee
Created Mar 15, 2018 — forked from ottonet/lychee
lychee nginx config
View lychee
server {
server_name my.lychee.site;
listen 80;
root /var/www/my.lychee.site/htdocs;
access_log /var/www/my.lychee.site/logs/access.log;
error_log /var/www/my.lychee.site/logs/error.log;
index index.php index.html;
@alanljj
alanljj / mysql-docker.sh
Created Feb 28, 2018 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
You can’t perform that action at this time.