Skip to content

Instantly share code, notes, and snippets.

View yfgeek's full-sized avatar
🐱
Excited +1s

Ivan yfgeek

🐱
Excited +1s
View GitHub Profile
@j0hnm4r5
j0hnm4r5 / HomebridgePS4.md
Last active April 25, 2022 23:49
Start your PS4 from Apple Home

PS4 On Homebridge

These are instructions to create a series of buttons within the Apple Home app that control PS4 power and open/close any app you want.

  1. Install Node.js

    Begin by installing Node.js if you haven't already. Their website has up-to-date versions and installation instructions for your OS.

    For macOS I use Homebrew to install packages. If you're a developer (or an aspiring one), I highly recommend using it. Via homebrew, installing node is as simple as brew install node.

进命令行,设置代理到ss
set http_proxy=http://127.0.0.1:1080
set https_proxy=https://127.0.0.1:1080
mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/tools.git
Cloning into 'tools'...
remote: Counting objects: 19439, done.
@jeffjohnson9046
jeffjohnson9046 / curl-cloud-config-props.sh
Last active May 26, 2022 17:35
use curl to check out a Spring Boot applicaion's configuration properties from a Spring Cloud Configuration service
# Occasionally I want to see the application properties that are pulled down from the Spring Cloud Config service that provides
# content to our Spring Boot apps. Since I seem to have to re-discover this every time, I figured I'd write it down to help me
# remember.
#
# Additional docs can be found here: https://cloud.spring.io/spring-cloud-config/single/spring-cloud-config.html
# To see the output in YML format
curl -u {the user name}:{the user password} http://{the domain:port}/{the application name}-{the spring profile name}.yml
# For example:
@assafshomer
assafshomer / op.js
Created March 10, 2016 11:57
bitcoinjs-lib op_return
wif='cNXxHLQwuzaLX7Z3apfSSEUDPPrQtUrwyzuaEZZakk2uWCcDS1Uo'
address='miq6AWvTYZJ63hJfh1W7zozHAf1URDv5pS'
unspent_txid = '067aabe97ff2e8051527d7f378266d046fd8e4c66e5b7dd671ec4e86b8a68cbb'
unspent_vout = 0
keyPair = bitcoin.ECPair.fromWIF(wif,network)
var txb = new bitcoin.TransactionBuilder(network)
var data = new Buffer('assafshomer')
var dataScript = bitcoin.script.nullDataOutput(data)
txb.addInput(unspent_txid, unspent_vout)
@badmofo
badmofo / borromean.py
Last active November 1, 2021 05:53
Pure Python Borromean Ring Signatures
'''
Pure Python Borromean Ring Signatures
DEPENDS ON: pip install ecdsa
WARNING: THIS IS A PEDAGOGICAL IMPLEMENTATION.
PERFORMANCE IS HORRIBLE AND NON-CONSTANT.
CORNER CASES ARE NOT PROPERLY CHECKED.
FOR THE LOVE OF GOD USE THE CODE FROM THE ELEMENTS PROJECT.
https://gist.github.com/badmofo/2d6e66630e4a6748edb7
'''
from hashlib import sha256
@byronhe
byronhe / modern_crypto.md
Last active March 28, 2022 07:51
现代密码学实践指南[2015年]

现代密码学实践指南[2015年]

标签(空格分隔): 密码学


本文介绍目前现代密码学的最先进技术, 前半部分主要翻译自 《Cryptographic Right Answers》,附上收集的资料,和byron个人的理解。

@xishuixixia
xishuixixia / gist:95a15779c87bf4c74894
Created August 19, 2014 10:10
10个基于Docker的顶尖开发工具

随着Docker的发展,Docker的生态圈也越来越成熟,GitHub上出现了很多与Docker相关的开源项目。近日,CenturyLink在其博客上总结了基于Docker的10个开发工具,主要集中在PaaS平台、集群管理、持续集成和Docker的管理工具等四个方面。InfoQ中文站在其基础上进行了整理,具体如下。

  1. Flynn Flynn是一个使用Go语言编写的开源PaaS平台,Flynn使用模块化的设计,任何一个模块都可以独立的进行修改、升级和替换。Flynn的目标是简化分布式环境中应用的部署和维护,通过使用git push命令,Flynn就可以将应用部署到Docker,从而省去了复杂的配置和操作。Flynn的架构大致分为两层,Layer 0是底层的资源层,提供分布式配置、任务调度、服务发现、主机隔离等基础功能;Layer 1基于Layer 0构建了一个用于集群中管理、部署、扩展服务的系统,主要包括管理API/客户端、Git接收器、数据存储、路由。Flynn目前仍在开发中,尚未发布稳定版,但已经获得了很多公司的资助,它被称为是下一代的开源PaaS平台。

  2. Deis Deis也是一个支持共有云和私有云的开源PaaS系统,Deis基于Docker和CentOS构建了一个类Heroku的PaaS系统。Deis主要设计用来和不同的云提供商进行交互,目前支持 Rackspace、EC2、 DigitalOcean、Google Compute Engine、Bare-Metal。Deis使用out-of-the-box的方式支持Ruby、Python、Node.js、Java、Clojure、Scala、Play、PHP、Perl、Dart和Go语言,同样支持git push部署。Flynn和Deis都是两个基于Docker的云计算微PaaS技术,关于它们的区别,可以参考[这篇文章](http://www.centurylinklabs.com/flynn-vs-deis-the-tale-of-two-docker-micro-pa

@snakevil
snakevil / howto-setup-transparent-proxied-router.md
Last active April 1, 2024 01:28
如何在路由器中实现透明代理?

如何在路由器中实现透明代理?

0 互联网现状

目前整个互联网环境,被破坏最严重地部分,是 Web 服务体验。当直接破坏难以实现时,就会从流程链的上下游着手,如:DNS 污染。

其它地互联网服务类型,例如:邮件,可能小部分会受到 Web 服务上下游破坏地余震,但整体上基本不受影响。

@1950195
1950195 / openshift.md
Last active May 8, 2017 02:08
介绍如何更新openshift的nodejs版本到最新

Openshift —— 强大的免费nodejs空间!(含免费二级域名)

简介

网址:https://www.openshift.com/

redhat 旗下站点,提供多种语言的免费云空间。

创建属于你的Nodejs站点

如何创建

  • 免费注册用户
@paranoiq
paranoiq / key.regexp.txt
Last active January 3, 2024 14:30
public RSA key validation regexp
#ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3} ([^@]+@[^@]+)#
// this is the most simple case. see more complete regexps in coments below
// http://generator.my-addr.com/generate_ssh_public_rsa_key-private_rsa_key-ssh_pair_online_tool.php
// https://help.ubuntu.com/community/SSH/OpenSSH/Keys
// http://www.ietf.org/rfc/rfc4716.txt