Skip to content

Instantly share code, notes, and snippets.

View teocci's full-sized avatar
👨‍💻
Coding

Teocci teocci

👨‍💻
Coding
View GitHub Profile

60+ AI tools to finish months of work in minutes.

  1. Research
  • ChatGPT
  • Claude
  • DeepSeek R1
  • Gemini
  • Abacus
  • Perplexity

Prompt engineering for code

I'm not going to spend a tonne of time talking about how to craft good prompts for things like GitHub Copilot. My colleague Rizel wrote an amazing blog posts that dives into prompt engineering for GitHub Copilot:

What I will say is that—similar to ChatGPT—GitHub Copilot relies on context. What other code is written in the repository? What is the extension (and therefore language) of the file? What else has GitHub Copilot crafted for you? What comments have you put into the code? All these things will help GitHub Copilot synthesise more accurate code for you.

Think about it like this: if you write a comment stating you want to create a complex function that uses backend data and solves a particular problem, you probably aren't going to get a good response with just a single comment. Much like your code—at least it should be—is broken up into many functions, with (hopefully) lots of useful comments, GitHub Copilot works better when you break things down.

Instead of asking GitH

We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
"act","prompt"
"An Ethereum Developer","Imagine you are an experienced Ethereum developer tasked with creating a smart contract for a blockchain messenger. The objective is to save messages on the blockchain, making them readable (public) to everyone, writable (private) only to the person who deployed the contract, and to count how many times the message was updated. Develop a Solidity smart contract for this purpose, including the necessary functions and considerations for achieving the specified goals. Please provide the code and any relevant explanations to ensure a clear understanding of the implementation."
"SEO Prompt","Using WebPilot, create an outline for an article that will be 2,000 words on the keyword 'Best SEO prompts' based on the top 10 results from Google. Include every relevant heading possible. Keep the keyword density of the headings high. For each section of the outline, include the word count. Include FAQs section in the outline too, based on people also ask section from Google for the ke

Prompt Teaching A prompt is a method used to adjust the text-to-image model. By inputting the content and effect you want, the model can understand your intention and generate images that meet your expectations. To ensure the model clearly understands and generates high-quality images, a good prompt needs to be rich in content and clearly described. This process is similar to when a teacher assigns us homework: if the teacher asks us to draw a picture without specifying what elements should be included and the purpose of the drawing, we would be unsure how to start. Similarly, the model also needs accurate and clear instructions when generating images. The more specific the prompt description, the more accurate and stable the generated image will be. If you only input “a girl” without specifying her “appearance”, “location”, “time”, “action”, or “details of the scene”, the model will generate an image result based on its own interpretation.

prompt:

A girl

However, if you have specific requireme

animation, cartoon, abstract, low quality, disfiguration, distortion, blurred details, grainy texture, surrealism, unrealistic proportions, oversaturated colors, glitches, pixelation, oversharpening, poor lighting, flat lighting, vivid fantasy, overexposure, overprocessing, CGI, artificial faces, plastic textures, uncanny valley, exaggerated features, unrealistic reflections, color banding, fake lens flare, 2D appearance, washed-out colors, motion artifacts, clipping

Freezing and uninstalling non-removable Android apps in Developer mode

  1. Download and install Android SDK Platform-Tools on your computer. Of the tools inside, you’ll only need the Android Debug Bridge USB driver and the ADB command line.
  2. Enable Developer mode on your phone. The details vary slightly from vendor to vendor, but the general recipe is roughly the same: repeatedly tap the Build Number option in the About Phone.
  3. Enable USB Debugging under Developer Settings on your smartphone. There are multiple options there — but don’t touch any apart from these two!
  4. Connect your smartphone to your computer through USB.
  5. Allow Debug mode on your phone screen.
  6. Test Debug mode by getting a list of all packages (what developers call apps) installed on your phone. To do so, type the following in the ADB command line
adb shell pm list packages 
import java.util.ArrayList;
import java.util.List;
import java.util.stream.LongStream;
public class ObjectUpdateExample {
public static <T> void printArray(List<T> list) {
printArray(list.toArray());
}
(function (global) {
"use strict";
var Typed = function (element, options) {
this.el = document.querySelector(element);
this.options = Object.assign({}, Typed.DEFAULTS, options);
this.isInput = this.el.tagName.toLowerCase() === "input";
this.attr = this.options.attr;
this.showCursor = !this.isInput && this.options.showCursor;
this.elContent = this.attr ? this.el.getAttribute(this.attr) : this.el.textContent;
sudo rmmod e1000
sudo rmmod e1000e
sudo rmmod igb
sudo modprobe e1000
sudo modprobe e1000e
sudo modprobe igb
sudo dhclient ens37
#!/bin/sh
set -e
# Docker CE for Linux installation script
#
# See https://docs.docker.com/engine/install/ for the installation steps.
#
# This script is meant for quick & easy install via:
# $ curl -fsSL https://get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#