Skip to content

Instantly share code, notes, and snippets.

View liasica's full-sized avatar
🤨
2021年,上线3-5个开源项目

liasica liasica

🤨
2021年,上线3-5个开源项目
View GitHub Profile
@Bluefissure
Bluefissure / fix.py
Last active February 9, 2024 05:44
Fix broken palworld save caused by existing guild & too many capture logs
# 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
@athurg
athurg / golang_image_filter.go
Created October 31, 2017 03:25
Golang版本的图像二值化分析范例
package main
import(
"fmt"
"os"
"image"
"image/jpeg"
"image/draw"
)
@vasiltabakov
vasiltabakov / FigureOptions.ts
Created October 7, 2017 09:47
Quill editor editable image caption
import Quill from 'quill';
import {TaskerFigure} from './TaskerFigure';
import Parchment from 'parchment';
export class FigureOptions {
quill: Quill;
figure;
overlay;
linkRange;
@r0l1
r0l1 / copy.go
Last active March 23, 2024 12:38
Copy a directory tree (preserving permissions) in Go.
/* MIT License
*
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@englishextra
englishextra / FX.js
Last active April 4, 2018 05:44
modified implementing fadeIn and fadeOut without jQuery
/*!
* implementing fadeIn and fadeOut without jQuery
* gist.github.com/englishextra/baaa687f6ae9c7733d560d3ec74815cd
* modified jsfiddle.net/LzX4s/
* changed options.complete(); to:
* function"==typeof options.complete && options.complete();
* usage:
* FX.fadeIn(document.getElementById('test'),
* {duration:2000,complete:function(){alert('Complete');}});
*/
@rayrutjes
rayrutjes / detectcontenttype.go
Created December 12, 2015 13:36
golang detect content type of a file
file, err := os.Open(path)
if err != nil {
return err
}
defer file.Close()
// Only the first 512 bytes are used to sniff the content type.
buffer := make([]byte, 512)
_, err = file.Read(buffer)
if err != nil {
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
$ ./configure && make
@denji
denji / README.md
Last active April 26, 2024 18:09 — forked from istepanov/gist:3950977
Remove/Backup – settings & cli for macOS (OS X) – DataGrip, AppCode, CLion, Gogland, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm
@cebe
cebe / main.php
Last active June 21, 2019 09:25
REST routing with Yii 2 UrlManager
<?php
return array(
/* ... */
'components' => array(
/* ... */
'urlManager' => array(
'enablePrettyUrl' => true,
'rules' => require(__DIR__ . '/routes.php'),
),
@jessedearing
jessedearing / gist:2351836
Created April 10, 2012 14:44 — forked from twoism-dev/gist:1183437
Create self-signed SSL certificate for Nginx
#!/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