Skip to content

Instantly share code, notes, and snippets.

View AG4GitHub's full-sized avatar

Andreas Gehrmann AG4GitHub

View GitHub Profile
@oliverspryn
oliverspryn / bard-prompt.txt
Created April 25, 2023 22:49
A prompt for Google Bard used to build ToDo Bard for Android using Jetpack Compose
I am going to build an native Android app using Kotlin and Jetpack Compose. I already have a new project created in Android Studio but would like your help for the rest. I don't have any screens, just an empty activity with a setContext() function inside of it, ready for Jetpack Compose to take over. My next prompt will explain what the app is for and what I want it to do.
This app should be a todo list app. It should have the following features:
- One screen with a list of all of your tasks.
- That screen should have an empty state saying "No Tasks" when there aren't any tasks stored in the app.
- The screen should have a FAB that allows you to add a new task to that list.
@faustind
faustind / github-haskell-projects.csv
Last active July 6, 2023 22:32
Github id's of non-forked Haskell projects on GitHub from GHTorrent 2018_04_01
We can't make this file beautiful and searchable because it's too large.
si14/desktop-config
nachivpn/replay
McGizzle/haxchange
vapourismo/type-interpreter
nicholaspun/learnYouAHaskell
EmileDreyer/Stuffs
easimonenko/haskell-examples
bsdlp/zsh-git-prompt
fosskers/servant-xml
tully-gray/FuglyBot
@nopeless
nopeless / README.md
Last active November 1, 2023 13:09
Python regex cheat sheet fast easy only examples

Official python re examples are so bad

Read this small note before you go

The python regex structure is mostly this
re.<method> is the go to interface with common signature as (pattern, string, flags=0)
and most of the time there is an equivalent Pattern.<method> with the first argument being the string instead of pattern
But the <method> has [, pos[, endpos]] and no flags=0 which might be useful
So I will omit all the equivalent methods' signatures

@seanli1
seanli1 / JSONImporterExporter.gs
Last active August 9, 2021 20:42
Import/Export JSON in Google Sheets - original: https://gist.github.com/pamelafox/1878143
// IMPORT
/**
* Imports JSON data to your spreadsheet Ex: IMPORTJSON("http://myapisite.com","city/population")
* @param url URL of your JSON data as string
* @param xpath simplified xpath as string
* @customfunction
*/
function IMPORTJSON(url,xpath){
@CaitlinHuey
CaitlinHuey / hypothesis-STIX2.json
Last active February 29, 2024 14:50
Representing a structured Hypothesis (STIX2) - co-authored by Sergey Polzunov
{
"objects": [
{
"labels": [
"source--eiq-fusion"
],
"name": "EclecticIQ Fusion Center",
"external_references": [
{
"source_name": "external-url",
@coinsandsteeldev
coinsandsteeldev / dialog.html
Last active May 28, 2024 17:42 — forked from arthurattwell/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<!DOCTYPE html>
<html>
<head>
<script>
var data
var formId = 'form'
function drawForm() {
if (!data) return
var outputEl = document.getElementById(formId);
@magjac
magjac / README.md
Last active July 9, 2021 20:48
D3 Graphviz GUI editor proof-of-concept

This is a proof-of-concept of a graphical editor that allows you to to edit a Graphviz graph graphically, by drawing edges between nodes and inserting new nodes by using the mouse only. It also allows you to edit the textual DOT language description and directly see the graph transform itself into a new layout in an animated transition.

The GUI editor is perfectly usable as it is, but it has some simplifications that needs to be addressed in a production quality application in order not to hamper productivity:

  • Draws only the standard type edge with alternating colors, although you can edit all aspects of it with the text editor afterwards and see the changes directly.
  • Draws only two kinds of node shapes, alternating between ellipse and polygon and different colors and using predefined names. Also this can of course be changed with the text editor.

Help is available by clicking the question mark in the top right corner.

This sma

@simonw
simonw / export-google-docs-to-restructured-text.js
Last active January 3, 2024 00:02
Google Apps script to convert a Google Docs document into reStructuredText
function onOpen() {
var ui = DocumentApp.getUi();
ui.createMenu('Convert to .RST')
.addItem('Convert to .RST and email me the result', 'ConvertToRestructuredText')
.addToUi();
}
// Adopted from https://github.com/mangini/gdocs2md by Renato Mangini
// License: Apache License Version 2.0
String.prototype.repeat = String.prototype.repeat || function(num) {
@swayvil
swayvil / data-example.json
Last active March 26, 2024 04:45
D3.js collapsing tree with boxes
{
"tree" : {
"nodeName" : "NODE NAME 1",
"name" : "NODE NAME 1",
"type" : "type3",
"code" : "N1",
"label" : "Node name 1",
"version" : "v1.0",
"link" : {
"name" : "Link NODE NAME 1",