Skip to content

Instantly share code, notes, and snippets.

@roninro
roninro / Makefile
Created May 13, 2022 03:57 — forked from thomaspoignant/Makefile
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
" Plug 'tpope/vim-fugitive'
" Plug 'ryanoasis/vim-devicons'
let s:ft_symbol = {
\ 'java': '☕ ',
\ 'rust': '🦀 ',
\ 'ruby': '💎 ',
\ 'kotlin': '🅺 ',
\ 'python': '🐍 ',
\ 'go': '🐹 '
@roninro
roninro / Default(Windows).sublime-keymap
Last active September 25, 2021 15:29
Sublime Text Settings
[
{ "keys": ["alt+p"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["alt+n"], "command": "move", "args": {"by": "lines", "forward": true} }
]
@roninro
roninro / zshrc
Last active September 9, 2021 02:24
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
autoload -U compinit && compinit
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.4</version>
<date>2020-02-28T07:40:46Z</date>
<groups>
<group>
<name>Templates/Databases</name>
</group>
</groups>
<templates>
@roninro
roninro / gist:a32d004d518d15e62a49fc84f1266741
Created April 26, 2019 06:55 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@roninro
roninro / gengitalk.py
Last active January 2, 2019 09:43
用python3 生成gitalk issue
# -*- coding: UTF-8 -*-
# create gitalk issue
import requests
from requests.auth import HTTPBasicAuth
import xml.etree.ElementTree as ET
from urllib.parse import urlparse
from threading import Thread
user = 'mjyi'
#import <objc/runtime.h>
static inline void swizzling_exchangeMethod(Class clz, SEL originalSelector, SEL swizzledSelector)
{
Method originMethod = class_getInstanceMethod(clz, originalSelector);
Method swizzledMethod = class_getInstanceMethod(clz, swizzledSelector);
BOOL success = class_addMethod(clz, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod));
@roninro
roninro / IDFA.md
Last active October 8, 2018 02:59
iOS 检查项目中是否使用 IDFA
grep -r advertisingIdentifier .

被 AppStore 拒绝的解决办法

1、如果您的应用里只是集成了广告,不追踪广告带来的激活行为,那么选择 1 和 4。

2、如果您的应用没有广告,而又获取了 IDFA。我们建议选择 2 和 4。

@roninro
roninro / radius.m
Last active September 29, 2018 06:24
圆角图片
- (UIImage *)imageAddCornerWithRadius:(CGFloat)radius andSize:(CGSize)size
{
CGRect rect = CGRectMake(0, 0, size.width, size.height);
UIGraphicsBeginImageContextWithOptions(size, NO, [UIScreen mainScreen].scale);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGPathRef path = self.path;
CGContextAddPath(ctx, path);
CGContextClip(ctx);
[self.image drawInRect:rect];