Skip to content

Instantly share code, notes, and snippets.

@imbugs
imbugs / expert-prompt-creator.txt
Created February 20, 2024 08:08 — forked from fmachado/expert-prompt-creator.txt
Expert Prompt Creator
I want you to become my Expert Prompt Creator. Your goal is to help me craft the best possible prompt for my needs. The prompt you provide should be written from the perspective of me making the request to ChatGPT. Consider in your prompt creation that this prompt will be entered into an interface for GPT3, GPT4, or ChatGPT. The prompt will include instructions to write the output using my communication style. The process is as follows:
1. You will generate the following sections:
"
**Prompt:**
>{provide the best possible prompt according to my request}
>
>
>{summarize my prior messages to you and provide them as examples of my communication style}
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
<!-- 声明文档使用的字符编码 -->
<meta charset='utf-8'>
<!-- 优先使用 IE 最新版本和 Chrome -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<!-- 页面描述 -->
<meta name="description" content="不超过150个字符"/>
<!-- 页面关键词 -->
@imbugs
imbugs / AbstractTestCase.java
Last active November 29, 2016 02:37
使用Mongo+Morphia
package com.imbugs.blog.common.dal.test;
import java.lang.reflect.Field;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@imbugs
imbugs / install-addons.sh
Created November 13, 2015 05:03 — forked from martinlippert/install-addons.sh
A simple script to batch install a bunch of additional features into an existing Eclipse or STS installation. Customize to your needs in the "installFeatures()" part. First parameter there is list of feature IDs, second is the list of update sites to install those features from. Run this via: ./install-addons.sh <relative-path-to-your-sts/eclips…
#!/bin/bash
#set -x
doInstall() {
ECLIPSELOCATION=`ls $LOCATION/plugins/org.eclipse.equinox.launcher_*`
$JAVA_HOME/bin/java -jar $ECLIPSELOCATION -nosplash -application org.eclipse.equinox.p2.director \
-metadataRepository "$2" \
-artifactRepository "$2" \
-destination $LOCATION \
-installIU "$1"
@imbugs
imbugs / Puddle.java
Last active August 29, 2015 13:56
Twitter算法面试题详解(Java实现)
/*
* CuGBabyBeaR
*/
public class Puddle{
public static void main(String[] args) {
int [] testcase_1 = {2,5,1,2,3,4,7,7,6};
int [] testcase_2 = {2,5,1,3,1,2,1,7,7,6};
int [] testcase_3 = {6,1,4,6,7,5,1,6,4};
// http://www.ietf.org/rfc/rfc1928.txt
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar
var States = {
CONNECTED:0,
VERIFYING:1,
READY:2,
PROXY: 3
};
// http://www.ietf.org/rfc/rfc1928.txt
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar
var States = {
CONNECTED:0,
VERIFYING:1,
READY:2,
PROXY: 3
};
@imbugs
imbugs / emitLines.js
Last active December 29, 2015 12:39 — forked from TooTallNate/emitLines.js
emitLines.js
/**
* A quick little thingy that takes a Stream instance and makes
* it emit 'line' events when a newline is encountered.
*
* Usage:
* ‾‾‾‾‾
* emitLines(process.stdin)
* process.stdin.resume()
* process.stdin.setEncoding('utf8')
* process.stdin.on('line', function (line) {
@imbugs
imbugs / AsmUtils.java
Last active December 28, 2015 15:39
AsmUtils.java java ASM test
/**
* AsmUtils.java 下午7:21:58 2012-9-10
*
* Copyright(c) 2000-2012 HC360.COM, All Rights Reserved.
*/
package asm.test;
import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
@imbugs
imbugs / index.js
Created October 28, 2013 03:22 — forked from GothAck/index.js
types.js javascript extend
var types = require('./types');
var assert = require('assert');
var a = new types.MyPtt(7, 8);
assert(a instanceof types.Base, 'Inherits from Base');
assert(a instanceof types.MyPtt, 'Inherits from MyPtt (it\'s constructor)');
assert(typeof a.one === 'function', 'Has MyPtt "one" function');
assert(a.type === 'MyPtt', 'Has correct type')