Skip to content

Instantly share code, notes, and snippets.

View Jackadminx's full-sized avatar
🌃
Sleep first

Jancgk Jackadminx

🌃
Sleep first
View GitHub Profile
@liuran001
liuran001 / config.yaml
Last active May 26, 2024 03:44
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.5-240507
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
@darconeous
darconeous / tesla-key-card-protocol.md
Last active May 7, 2024 23:59
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@Sg4Dylan
Sg4Dylan / BH1750_CTL.ino
Created June 24, 2019 12:58
显示器亮度自动调节套装
#include <Wire.h>
#include <BH1750.h>
BH1750 lightMeter;
void setup(){
Serial.begin(9600);
// Initialize the I2C bus (BH1750 library doesn't do this automatically)
// On esp8266 devices you can select SCL and SDA pins using Wire.begin(D4, D3);
Wire.begin();
@xoseperez
xoseperez / rpi3_iot_server.md
Last active February 11, 2024 15:05
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)
@sunwu51
sunwu51 / README.md
Last active November 27, 2019 08:46
我的创业过程中遇到的问题和解决方案

创业?

前一段时间我和几个同学还有几个公司的人一起做了一个创业的项目,是关于一个手机app的。我在项目中的角色是服务端的负责人。其实就我一个人做服务端,因为之前没有真正做过这种模式的项目,所以刚开始的时候有些犯怵,很多是平时不知道的东西要先去学习。另外因为各方面的考虑最后选择了用php来做服务端,而我的php水平是比较浅显的。所以在这个项目的进行过程中,我要不断遇到问题,探索问题,解决问题。

php?

"世界上最好的语言"我个人不太喜欢写PHP,但是确实在做一个互联网项目的时候,需要考虑整合第三方的框架,比如聊天框架,支付宝微信支付框架等。这些框架往往只提供java .net 和 php三个版本的SDK和demo,如果这时候我们用的是python开发或者nodejs开发的服务端,那很多库还要自己封装,十分麻烦,而java的开发效率较低,对于原型服务来说不合适.net又要用非常不熟悉的windows服务器。所以客观来看php是最合适的。

框架?

虽然学过php的基础语法,但是想要用原生的php来写服务端确实不是一个明智的选择。单是数据库的查询就要超过业务逻辑的代码量了。而php的框架我只学过thinkphp这个简单(简陋)实用的,不过对于我们的app来说thinkphp的功能已经够用了。所以最后选择了thinkphp框架,来做服务端。版本是3.2.3版本。

短信验证

在注册的时候发送短信验证码,是我遇到的第一个问题,之前做的东西都是自己在玩,根本不会用到这种第三方的东西。第一次接触这种sdk还是有些胆怯的,不过仔细阅读了步骤,发现似乎并不难。因为服务器租了阿里的,所以短信的服务干脆也从阿里来租。于是查到了阿里大于http://www.alidayu.com

阿里大于注册是免费的,而且上来会提供几块钱的免费券,可以让你测试发送短信,注册后(有淘宝账号直接登录)进入管理中心。需要做的步骤依次为:

@mosquito
mosquito / README.md
Last active May 24, 2024 17:00
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@rahilwazir
rahilwazir / vmdk_vhdx.md
Last active March 3, 2024 22:01
Convert VMWare to Hyper-V (vmdk to vhdx)
@mikkeloscar
mikkeloscar / guide.md
Created June 14, 2014 20:44
Setup armv7h chroot under x86_64 host (Archlinux/Archlinuxarm biased)

Setup armv7h chroot under x86_64 host (Archlinux/Archlinuxarm biased)

Simple way to setup an arm chroot for building packages for your arm devices. This is an alternative to cross-compiling where you are limited to only linking against the libs in your toolchain.

Setup chroot-fs

You can store the chroot wherever you like. I choose to store it in a disk-image which I mount to my filesystem.

@zer4tul
zer4tul / 提问的智慧.md
Last active April 9, 2024 01:20
Simplified Chinese edition of "How To Ask Questions The Smart Way"
@ninehills
ninehills / zerorpc.md
Created June 18, 2013 12:17
ZeroRPC简介 - 轻量级分布式通信框架

ZeroRPC简介 - 轻量级分布式通信框架

概述

分布式系统的核心是分布式通信,而传统上开发一套支持上千台规模集群,可靠性非常高的分布式通信框架,需要不少的精力投入。而在多数情景下,我们(特别是时间宝贵的OP)并不是非常关注技术实现的细节,而是希望有一套成熟、轻量、可靠性高、使用方便而且易于调试的分布式通信框架,可以直接使用,从而把时间放在具体业务逻辑上。

在PyCon 2012大会上,dotcloud公司开源了一套基于ZeroMQ和MessagePack的分布式通信框架(或者说是协议+Python实现)。该框架因为基于ZeroMQ,使用方法是RPC,所以被命名为ZeroRPC。ZeroRPC的特点在其官网的介绍中一目了然[1]:

ZeroRPC is a light-weight, reliable and language-agnostic library for distributed communication between server-side processes.