Skip to content

Instantly share code, notes, and snippets.

@hite
hite / PerformanceMonitor.m
Last active June 27, 2023 11:06
在 runloop 里捕获 主线程卡顿,并且收集到卡顿时堆栈的信息,供下一步 fabric 来处理
//
// PerformanceMonitor.m
// SuperApp
//
// Created by qianjianeng on 15/11/12.
// Copyright © 2015年 Tencent. All rights reserved.
//
#import "PerformanceMonitor.h"
#import <mach/mach.h>
@jdmcd
jdmcd / API.swift
Last active June 19, 2020 07:37
Alamofire + Codable
class API {
static let apiKey = "test"
static let baseUrl = ""
enum Endpoint {
case login
case register
var endpoint: String {
switch self {
@guiman
guiman / config.rb
Last active October 26, 2018 13:50
Example mina deploy script using docker
require 'mina/git'
require 'mina/nginx'
set :application, 'your_app_name'
set :domain, 'your_server'
set :user, 'ubuntu'
set :deploy_to, '/location/to/deploy'
set :app_path, "#{deploy_to}/#{current_path}"
set :repository, 'your_repo'
set :branch, 'master'
@d3m3vilurr
d3m3vilurr / feedly_api.md
Last active March 30, 2024 08:21
Unofficial Feedly API Document

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api

@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@kavu
kavu / Gemfile
Last active July 17, 2017 05:38 — forked from anonymous/Gemfile
How to make Rails + Backup + Whenever + Capistrano (and rbenv) work.
#...
gem 'backup', require: false,
github: 'kavu/backup',
branch: 'bump_fog_version',
ref: 'c3fd8e6eb4f464de1c8'
gem 'whenever', require: false
#...

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: