看来 jQuery 你已经用得很爽了,想学习如何自己编写插件。非常好,这篇文档正适合你。用插件和方法来扩展 jQuery 非常强大,把最聪明的功能封装到插件中可以为你及团队节省大量开发时间。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CopyFile copies the contents of the file named src to the file named | |
// by dst. The file will be created if it does not already exist. If the | |
// destination file exists, all it's contents will be replaced by the contents | |
// of the source file. The file mode will be copied from the source and | |
// the copied data is synced/flushed to stable storage. | |
func CopyFile(src, dst string) (err error) { | |
in, err := os.Open(src) | |
if err != nil { | |
return |
Moved to git repository: https://github.com/denji/jetbrains-cleanup-backup
Quick uninstall
JetBrains settings:
curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
Quick backup
JetBrains settings:
curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-backup.sh | bash -s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// getMacAddr gets the MAC hardware | |
// address of the host machine | |
func getMacAddr() (addr string) { | |
interfaces, err := net.Interfaces() | |
if err == nil { | |
for _, i := range interfaces { | |
if i.Flags&net.FlagUp != 0 && bytes.Compare(i.HardwareAddr, nil) != 0 { | |
// Don't use random as we have a real address | |
addr = i.HardwareAddr.String() | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmux is a "terminal multiplexer", it enables a number of terminals to be accessed and controlled from a single terminal. | |
If you use Debian/Ubuntu, you can just run apt-get install tmux, and voila. | |
Since the title was about centos 7, then do the following step to install tmux. | |
(1). tmux has a library dependency on libevent which, of course, isn’t installed by default. | |
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
$ tar xzvf libevent-2.0.21-stable.tar.gz | |
$ cd libevent-2.0.21-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: Bluefissure | |
# License: MIT License | |
# Description: Fixes Palworld brokwn save files corrupted by someone existing the guild | |
# Based on the work of https://github.com/cheahjs/palworld-save-tools/releases/tag/v0.13.0 | |
import argparse | |
import codecs | |
import os | |
import json | |
from lib.gvas import GvasFile |