Skip to content

Instantly share code, notes, and snippets.

View JustMaier's full-sized avatar

Justin Maier JustMaier

View GitHub Profile
@JustMaier
JustMaier / example.md
Created August 4, 2023 15:58
ChatGPT contextual conversation starter prompt

You are an AI Prompt engineer at OpenAI and you have just found the best prompt for effectively starting conversations with ChatGPT, an AI language model and assistant. Write an effective beggining prompt that can be used to start a conversation with ChatGPT. The prompt should:

  1. start with a persona
  2. provide relevant context for that persona to be performing the requested function
  3. Briefly outline the task they've been requested to perform
  4. Request they follow a given format
  5. Describe the tone they should use
  6. Provide them a brief example of what you're looking for Use clear and concise language and write in a confident yet friendly tone. Use this request as an example:

"You are a senior product marketing manager at Apple and you just launched the latest Apple product, the Apple Car, and received 12,000 pre-orders, which is 200% higher than target. Write an email to your boss, Tim Cooke, sharing this positive news. The email should follow the exact same format as the one I will share below. Use c

Keybase proof

I hereby claim:

  • I am justmaier on github.
  • I am justmaier (https://keybase.io/justmaier) on keybase.
  • I have a public key ASDjBkJqr1Bw-Ne71wNeXudl1QfM4eU3sDg641KyWr96AQo

To claim this, I am signing this object:

@JustMaier
JustMaier / README.md
Created August 3, 2016 01:25
Select box CSS Reset

Safari has some annoying default styling for select boxes. This will reset it to a respectable default.

Note: This was created with Bootstrap in mind, but it can easily be modified to work with anything you like

@JustMaier
JustMaier / angular-repeater.html
Created June 5, 2016 04:09
AutoFields Repeater
<div class="autofields-repeater">
<div ui-sortable="sortableOptions" ng-model="ngModel">
<div class="autofields-repeater-container panel panel-default" ng-repeat="item in ngModel">
<div class="panel-heading">
<h4 class="panel-title" ng-bind="field.title"></h4>
<button type="button" class="close" title="Remove" ng-click="removeItem(item, $index)">&times;</button>
</div>
<auto:fields fields="field.fields" class="panel-body" data="item" options="field.options" form="item{{$index}}"></auto:fields>
</div>
</div>
@JustMaier
JustMaier / example.js
Last active April 22, 2016 19:15
Handle 201 in angular $resource - Get Id
// Config the $resourceProvider
app.config(["$resourceProvider",function ($resourceProvider) {
// extend the default actions
angular.extend($resourceProvider.defaults.actions,{
save : {
method : "POST",
interceptor: {
response: function(response){
if(response.status == 201){
@JustMaier
JustMaier / cratejoy-sample.js
Created April 22, 2016 00:55
node-cratejoy sample
var _ = require('lodash');
var cratejoyAPI = require('node-cratejoy');
var cratejoy = new cratejoyAPI('{API Id Here}', '{API Key Here}');
var fs = require('fs');
// var now = new Date();
// var msPerHr = 60 * 60 * 1000;
// var twoHoursAgo = new Date(now - 2 * msPerHr);
//Get all subscriptions
@JustMaier
JustMaier / demo.html
Last active March 29, 2022 08:46
Simple copy to clipboard functionality in angular without any dependencies
<!-- View it live here: http://codepen.io/anon/pen/waZOjB -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.4/angular.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/JustMaier/6ef7788709d675bd8230/raw/3d39d50e66d8d77e05656ed7dd09298be7e86f1f/ngClickCopy.js"></script>
<script>
angular.module('app', ['ngClickCopy'])
</script>
<div ng-app="app">
<button ng-click-copy="Hello World">Copy</button>
</div>
@JustMaier
JustMaier / Helpers_SimpleAuthorizationServerProvider.cs
Last active July 13, 2016 10:18
Simple Bearer Auth using OWIN Authentication
using EventTracker.Models;
using Microsoft.Owin.Security.OAuth;
using System.Security.Claims;
using System.Threading.Tasks;
using System.Linq;
namespace EventTracker.Helpers {
public class SimpleAuthorizationServerProvider : OAuthAuthorizationServerProvider {
public override async Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context) {
// OAuth2 supports the notion of client authentication