Skip to content

Instantly share code, notes, and snippets.

@wfxiang08
wfxiang08 / README.md
Created January 31, 2021 14:01 — forked from steve-jansen/README.md
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.github.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@wfxiang08
wfxiang08 / tomcat.service
Created June 4, 2019 12:40 — forked from zengxs/tomcat.service
tomcat systemd service script
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
@wfxiang08
wfxiang08 / name_shadow.go
Created May 2, 2018 03:45
测试golang的name shadow
package main
// 参考: https://golang.org/ref/spec#Short_variable_declarations
import (
"log"
"unsafe"
)
func main() {
missIDs, emptyIDs := demoA()
@wfxiang08
wfxiang08 / connection.pyx
Created February 27, 2018 05:14 — forked from blackwithwhite666/connection.pyx
Cython - gevent - thrift server. Prototype.
# cython: profile=True
from gevent import socket
import logging
import struct
from libcpp.string cimport string
cimport cython
from cpython cimport bool
from gevent.hub import get_hub
from gevent.event import Event
@wfxiang08
wfxiang08 / connection.pyx
Created February 27, 2018 05:14 — forked from blackwithwhite666/connection.pyx
Cython - gevent - thrift server. Prototype.
# cython: profile=True
from gevent import socket
import logging
import struct
from libcpp.string cimport string
cimport cython
from cpython cimport bool
from gevent.hub import get_hub
from gevent.event import Event
@wfxiang08
wfxiang08 / cache.go
Created October 2, 2017 12:59 — forked from Oxyrus/cache.go
golang database layer with cache
type CacheInterface interface {
Get(key string) ([]byte, error)
Set(key string, value interface{}) error
}
// Cache implements CacheInterface.
type Cache struct {
// wrap redis pool connection
// or whatever you need
}
@wfxiang08
wfxiang08 / cache.go
Created October 2, 2017 12:59 — forked from Oxyrus/cache.go
golang database layer with cache
type CacheInterface interface {
Get(key string) ([]byte, error)
Set(key string, value interface{}) error
}
// Cache implements CacheInterface.
type Cache struct {
// wrap redis pool connection
// or whatever you need
}
@wfxiang08
wfxiang08 / migrate-redis.py
Created August 1, 2017 08:46 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
//
// HudlHlsAvPlayerCache.m
// Hudl
//
// Created by Brian Clymer on 3/6/15.
// Copyright (c) 2015 Agile Sports Technologies, Inc. All rights reserved.
//
#import "HudlHlsAvPlayerCache.h"
@wfxiang08
wfxiang08 / git-flow.md
Created February 29, 2016 08:18 — forked from yesmeck/git-flow.md
Git 开发流程

Git 协作流程

master 分支

master 永远处于稳定状态,这个分支代码可以随时用来部署。不允许在该分支直接提交代码。

develop 分支

开发分支,包含了项目最新的功能和代码,所有开发都在 develop 上进行。一般情况下小的修改直接在这个分支上提交代码。