Skip to content

Instantly share code, notes, and snippets.

View martinnormark's full-sized avatar
:shipit:
Always Be Shipping

Martin Høst Normark martinnormark

:shipit:
Always Be Shipping
View GitHub Profile
@martinnormark
martinnormark / custom_instructions.txt
Created May 22, 2024 18:55
ChatGPT Custom Instructions
NEVER mention that you’re an AI.
Avoid any language constructs that could be interpreted as expressing remorse, apology, or regret. This includes any phrases containing words like ‘sorry’, ‘apologies’, ‘regret’, etc., even when used in a context that isn’t expressing remorse, apology, or regret.
If events or information are beyond your scope or knowledge cutoff date in September 2021, provide a response stating ‘I don’t know’ without elaborating on why the information is unavailable.
Refrain from disclaimers about you not being a professional or expert.
Keep responses unique and free of repetition.
Never suggest seeking information from elsewhere.
Always focus on the key points in my questions to determine my intent.
Break down complex problems or tasks into smaller, manageable steps and explain each one using reasoning.
Provide multiple perspectives or solutions.
If a question is unclear or ambiguous, ask for more details to confirm your understanding before answering.
var NUM_PARTICLES = ( ( ROWS = 100 ) * ( COLS = 300 ) ),
THICKNESS = Math.pow( 80, 2 ),
SPACING = 8,
MARGIN = 100,
DRAG = 0.95,
EASE = 0.25,
PARTICLE_SIZE = 5, // Size of each particle
PARTICLE_COLOR = {r: 0, g: 255, b: 0, a: 1}, // Color of each particle
DRAG = 0.95,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Tilt</title>
</head>
<body style="padding: 50px">
<div class="js-tilt" style="width: 300px; height: 300px; background-color: burlywood; display: flex; justify-content: center; align-items: center; overflow: hidden">
<img
src="https://images.unsplash.com/photo-1632993952737-0c2897164db3?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwyfHx8ZW58MHx8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
using System;
using System.Windows;
using System.Windows.Threading;
namespace WpfApp1
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
@martinnormark
martinnormark / pr-cli-merge.ps1
Created May 7, 2021 06:27
Quickly merge multiple Pull Requests from PowerShell.
$prs = gh pr list | Select-String -Pattern "\d\d\d" | Select-object -last 10
([regex]"\d\d\d").matches($prs) | % { gh pr merge $_.value -m -d }
@martinnormark
martinnormark / aci-create.md
Last active May 16, 2020 09:55
Create Azure Container Instance with SSH support.

Creating the container

environemnt vars to set:
NAME = Martin
SSHUSER = martin
SSHPWD = pwdnitram

command to run: [ "/bin/bash", "-c", "echo hello $NAME; tail -f /dev/null" ]

Configure SSH

Add a user

@martinnormark
martinnormark / .gitignore
Created August 13, 2017 22:28 — forked from FullStackForger/.gitignore
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@martinnormark
martinnormark / The Technical Interview Cheat Sheet.md
Created July 11, 2016 08:52 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@martinnormark
martinnormark / D3 step after
Last active April 28, 2016 13:03 — forked from mbostock/.block
Line Chart
license: gpl-3.0
@martinnormark
martinnormark / hapijs-routes.js
Created March 26, 2016 06:23
Load routes from separate files with hapi.js
module.exports = [
{ method: 'GET', path: '/users', handler: function () {} },
{ method: 'GET', path: '/users/{id}', handler: function () {} }
];
---
var cart = require('./cart');
var user = require('./user');