Skip to content

Instantly share code, notes, and snippets.

View ismdeep's full-sized avatar

L. Jiang ismdeep

View GitHub Profile
@ismdeep
ismdeep / pagination.go
Created January 24, 2024 09:15
pagination.go
package pagination
import "fmt"
type Pair struct {
StartIndex int64
EndIndex int64
}
func newPair(l, r int64) Pair {
@shiritrong
shiritrong / gist:d85bb1e16c66d1a09896727780b4fc7c
Last active June 18, 2024 06:50
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG
@pygman
pygman / add-apt-repository.sh
Last active September 29, 2018 09:48
Debian系列添加PPA源支持 add-apt-repository
sudo apt-get install python-software-properties //首先尝试安装这个软件
sudo apt-get install software-properties-common //上面尝试如果add-apt-repository不能运行,尝试安装这个软件
sudo apt-get install apt-file
sudo apt-file update
# 测试成功
# ss 使用
apt-file search add-apt-repository
sudo add-apt-repository ppa:hzwhuang/ss-qt5
@dtomasi
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@pascalc
pascalc / gist:3859270
Created October 9, 2012 14:44
Java Pollard's Rho
import java.math.BigInteger;
import java.security.SecureRandom;
public class PollardOptimised {
private final static BigInteger ZERO = new BigInteger("0");
private final static BigInteger ONE = new BigInteger("1");
private final static BigInteger TWO = new BigInteger("2");
private final static SecureRandom random = new SecureRandom();
public static BigInteger f(BigInteger x, BigInteger c, BigInteger N) {