Skip to content

Instantly share code, notes, and snippets.

@esurdam
esurdam / ecdsa_openssl.md
Last active December 21, 2023 09:12
Generate ECDSA certs

ECDSA Certs with LetsEncrypt

More on ECDSA

Info on bit length and complexity

From it you may gather that using 256 bit ECDSA key should be enough for next 10-20 years.

To view your available curves

@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active May 22, 2024 02:19
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@Liqianyu
Liqianyu / bestroutetb
Last active August 11, 2016 13:58
bestroutetb china route UPDATE:2016-2-19
## Australia 47.44% 23043328
## China 100.00% 336902912
## Thailand 45.61% 4109824
## India 72.12% 27300096
## Malaysia 42.59% 2838784
## South Korea 65.20% 73268992
## Vietnam 73.08% 11535360
## Taiwan Province of China 57.18% 20297728
## Singapore 30.64% 2177024
## New Zealand 29.48% 2017024
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
echo $DIR
@azinman
azinman / AppDelegate.m
Last active February 20, 2018 06:53
@synchronized vs pthread mutex vs NSRecursiveLock vs Semaphore
//
// AppDelegate.m
// LockTest
//
// Created by zinman on 1/29/16.
//
#import "AppDelegate.h"
#import <pthread.h>
@daiakushi
daiakushi / mylua.c
Created January 21, 2016 14:20
Lua interacts with C
#include "lua.h"
#include "lauxlib.h"
int l_bar(lua_State *L)
{
const char *str = lua_tostring(L, -1);
int length;
while (1) {
char c = str[length];
if (c == '\0')
@nbouvrette
nbouvrette / inputTypeNumberPolyfill.js
Last active March 28, 2023 11:26
Stand alone JavaScript polyfill allow only numbers on input of type number.
/**
* Stand alone polyfill allow only numbers on input of type number.
*
* While input filtering is already supported by default by some browsers, maximum length has not been implemented by
* any. This script will solve both issue and make sure that only digits can be entered in input elements of type
* number. If the optional attribute `max` is set, it will calculate it's length and mimic the `maxlength` behavior on
* input of type text.
*
* Supports:
*
@stephenturner
stephenturner / install-gcc48-linuxbrew-centos6.md
Last active March 6, 2022 02:49
Installing gcc 4.8 and Linuxbrew on CentOS 6

Installing gcc 4.8 and Linuxbrew on CentOS 6

The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.

Note: Requires sudo privileges.

Resources:

@janlay
janlay / README.md
Last active May 11, 2024 03:22
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

@soffchen
soffchen / Surge.md
Last active August 10, 2023 13:56
Surge

Feature

  • 替代 PAC,实现根据规则区分选择代理线路
  • 支持 SOCKS5 和 Shadowsocks 协议
  • 完整支持所有的 Shadowsocks 加密方式 (table, rc4-md5, salsa20, chacha20, aes-256-cfb, aes-192-cfb, aes-128-cfb, bf-cfb, cast5-cfb, des-cfb, rc2-cfb, rc4, seed-cfb)
  • 全面支持双向 HTTP Keep-Alvie
  • 快,各种黑科技加速
  • 直接临时修改某个域名的访问规则 (暂时仅 Mac 版本)
  • 支持使用 GeoIP 规则决定线路

Usage