Skip to content

Instantly share code, notes, and snippets.

@troyfontaine
troyfontaine / 1-setup.md
Last active April 19, 2024 00:09
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@0mkara
0mkara / Ethereum_private_network.md
Last active April 19, 2024 00:09
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@mkropat
mkropat / knownpaths.py
Last active April 19, 2024 00:07
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
@jaskiratr
jaskiratr / chmod-400.cmd
Created June 29, 2018 01:03
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
@nufeng1999
nufeng1999 / InstallWSA.md
Last active April 19, 2024 00:02
[安装 Windows Subsystem for Android™️ ] 安装 Windows Subsystem for Android™️

1.获得 WAS 微软商店链接地址

https://www.microsoft.com/store/productId/9P3395VX91NR

2.下载 WAS 安装包

安装包抓包网址
https://store.rg-adguard.net/ 在这里输入上述商店链接,右边要选择Slow通道
(共有四个选项,分别是Fast,Slow,RP和Retail,分别对应Windows的Dev渠道,Beta渠道,RP渠道和正式版,目前只有Beta版本有发布)
找到最下面名为
"MicrosoftCorporationII.WindowsSubsystemForAndroid_*.msixbundle"
的包进行下载,即可获取最新的Beta版本的抓包

@rrufai
rrufai / lean_trader.coffee
Created January 17, 2018 19:05
Infrequent EMA crossover trading Bot
###
The script engine is based on CoffeeScript (http://coffeescript.org)
The Cryptotrader API documentation is available at https://cryptotrader.org/api
EMA CROSSOVER TRADING ALGORITHM
The strategy enters buy orders when the short-term EMA crosses above the long-term EMA
or enters sell orders when the short-term EMA crosses below the long-term EMA.
@kentblakely
kentblakely / lean_trader.coffee
Created April 19, 2024 00:00 — forked from rrufai/lean_trader.coffee
Infrequent EMA crossover trading Bot
###
The script engine is based on CoffeeScript (http://coffeescript.org)
The Cryptotrader API documentation is available at https://cryptotrader.org/api
EMA CROSSOVER TRADING ALGORITHM
The strategy enters buy orders when the short-term EMA crosses above the long-term EMA
or enters sell orders when the short-term EMA crosses below the long-term EMA.
@ryanburgess
ryanburgess / IE7.js
Created January 1, 2014 22:15
IE7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6.
<!--[if lt IE 7]><script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE7.js"></script><![endif]-->
@valichek
valichek / gist:ba510de9ff2cf3d0c502
Created May 5, 2014 21:12
Strange behaviour of merge and into with map where keys are instances of AsyncChannel from http-kit
(ns clj-test-server.core
(:use org.httpkit.server))
; https://github.com/http-kit/http-kit/blob/master/src/java/org/httpkit/server/AsyncChannel.java
(def clients (atom nil))
(defn handler []
(future (let
[merged (merge {} @clients)]