Skip to content

Instantly share code, notes, and snippets.

View jackey's full-sized avatar
🏠
Working from home

jackey

🏠
Working from home
  • A programer
  • Changde, Hunan, China
View GitHub Profile
@jackey
jackey / my.cnf
Created July 18, 2023 01:52 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@jackey
jackey / ubuntu-kernel-tuning.sh
Created May 30, 2023 09:29 — forked from soediro/ubuntu-kernel-tuning.sh
ubuntu kernel tuning script
#!/bin/bash
#vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
#
# Author : Nicolas Brousse <[email protected]>
# From : https://www.shell-tips.com/2010/09/13/linux-sysctl-configuration-and-tuning-script/
#
# Added kernel version < 2.6.33 set net.ipv4.tcp_congestion_control=htcp
# Notes :
# This script is a simple "helper" to configure your sysctl.conf on linux
# There is no silver bullet. Don't expect the perfect setup, review comments
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
)
@jackey
jackey / README
Created April 30, 2021 06:04
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.1+commit.df193b15.js&optimize=false&runs=200&gist=
// this line is added to create a gist. Empty file is not allowed.
@jackey
jackey / user.go
Last active August 4, 2019 03:37
read socket message
/**
goroutine 32842 [IO wait]:
internal/poll.runtime_pollWait(0x7f41c5807930, 0x72, 0xc0005c7b98)
/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc000d09298, 0x72, 0xffffffffffffff00, 0x75a040, 0x9084e8)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc000d09298, 0xc00177b000, 0x1000, 0x1000)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc000d09280, 0xc00177b000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
@jackey
jackey / nginx-restart.bat
Created March 4, 2018 07:01
Quick startup for NGINX and PHP on Windows
@ECHO OFF
call nginx-stop.bat
call nginx-start.bat
EXIT /b
@jackey
jackey / xml
Created January 1, 2018 03:44
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx</groupId>
<artifactId>yyy</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
@jackey
jackey / api.js
Created October 2, 2017 13:54
POST / GET / PUT method with fetch API
import es6Promise from 'es6-promise';
es6Promise.polyfill();
import fetch from 'isomorphic-fetch';
export function loginUrl() {
return '';
}
export function codeUrl() {
return '/resources-code.jpg';
@jackey
jackey / go
Created March 5, 2017 06:32
site clone with golang
package main
import (
"log"
"io"
"strings"
"net/http"
_ "bufio"
"net/url"
"io/ioutil"
@jackey
jackey / json
Last active February 18, 2017 15:49
cookies headers
HTTP/1.1 200 OK
Date: Sat, 18 Feb 2017 15:45:27 GMT
Server: nginx/1.2.8
Strict-Transport-Security: max-age=15768000
Cache-Control: private
Content-Type: application/json; charset=utf-8
X-Powered-By: node.js
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, X-Requested-With, x-request, Content-Type, Accept
Access-Control-Allow-Credentials: true