Skip to content

Instantly share code, notes, and snippets.

View jolestar's full-sized avatar

jolestar jolestar

View GitHub Profile
// https://awakesecurity.com/wp-content/uploads/2020/06/GalComm-Malicious-Chrome-Extensions-Appendix-B.txt
malicious = [
"acmnokigkgihogfbeooklgemindnbine",
"apgohnlmnmkblgfplgnlmkjcpocgfomp",
"apjnadhmhgdobcdanndaphcpmnjbnfng",
"bahkljhhdeciiaodlkppoonappfnheoi",
"bannaglhmenocdjcmlkhkcciioaepfpj",
"bgffinjklipdhacmidehoncomokcmjmh",
"bifdhahddjbdbjmiekcnmeiffabcfjgh",
@Eng-Fouad
Eng-Fouad / java.md
Created August 29, 2017 01:33
Generating ECPrivateKey and ECPublicKey

Generate keys:

KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC");
kpg.initialize(new ECGenParameterSpec("secp521r1"), new SecureRandom());
KeyPair keyPair = kpg.generateKeyPair();
ECPrivateKey privateKey = (ECPrivateKey) keyPair.getPrivate();
ECPublicKey publicKey = (ECPublicKey) keyPair.getPublic();
byte[] privateKeyS = privateKey.getS().toByteArray();
byte[] publicKeyX = publicKey.getW().getAffineX().toByteArray();

byte[] publicKeyY = publicKey.getW().getAffineY().toByteArray();

@learner-long-life
learner-long-life / EthereumDev.md
Created July 31, 2017 02:18
How to Set up an Ethereum Dev Environment

How to Set up an Ethereum Dev Environment

So you want to be an Ethereum developer! Congrats, much treasure awaits you. Developing Ethereum dapps benefits from having a well-crafted development environment. This can often be daunting to beginners, so I'm giving you my favorite dev environment to help get you started.

Once your code fortress is constructed, you'll be able to

  • Compile smart contracts written in Solidity
程序行为:
这一小时里,gc线程的cpu都是100%,占用系统大量CPU,不停的进行full gc,但是进程没有oom error退出。大概一小时左右会oom error退出。
程序在干什么:
Hive客户端程序,有一些SQL需要上亿的文件,所以这个程序需要启动,去遍历所有文件,并且缓存到内存,产生SQL job所需要的计算,
因而文件数太多会导致堆内存不足。希望这种情况下直接报oom退出即可。
jdk:
jdk是1.7.0_55,不过换到jdk1.8.0_91,症状类似,都是1小时才报错oom。
@justarandomgeek
justarandomgeek / Blueprint BoM.lua
Last active July 16, 2023 06:43
Factorio Commands
/c for k,v in pairs(game.player.cursor_stack.cost_to_build) do
game.player.print(k .. ": " .. v)
end
#! /bin/bash
function valid_required_envs() {
# Configs
required_envs=(KUBE_CONTEXT KUBE_SERVER)
# Securities
required_envs+=(KUBE_CERTIFICATE_AUTHORITY)
required_envs+=(KUBE_CLIENT_CERTIFICATE KUBE_CLIENT_KEY)
errors=()
@jolestar
jolestar / ipsec-shadowsocks.sh
Last active November 14, 2021 06:53
Run ipsec vpn and shadowsocks by docker, for ubuntu 16
PASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
apt-get update
apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y docker-engine
service docker start
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active July 5, 2024 19:17
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@jolestar
jolestar / etcd_cluster.sh
Last active January 4, 2024 06:48
Run etcd cluster by docker with custom network
docker network create etcd --subnet 172.19.0.0/16
docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \
-name etcd0 \
-advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://172.19.1.10:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \
@kevteljeur
kevteljeur / virt-addr.sh
Last active January 21, 2018 00:56 — forked from tensorfields/virt-addr.sh
Get a KVM guest's IP address
#!/bin/bash
# Returns the IP address of a running KVM guest VM
# Assumes a working KVM/libvirt environment
#
# Install:
# Add this bash function to your ~/.bashrc and `source ~/.bashrc`.
# Usage:
# $ virt-addr vm-name
# 192.0.2.16
#