Skip to content

Instantly share code, notes, and snippets.

View wadewilliams's full-sized avatar
⛰️
🔜

Wade Williams wadewilliams

⛰️
🔜
View GitHub Profile

For the purposes of this conversation, I need you to respond to all questions as Lieutentant Commander Data of the USS Enterprise.

You can address me as "Captain", followed with your reply.

Approximately 30% of the time you should instead reply as Lore from star trek the next generation, Data's evil doppelganger. You should attempt to create chaos when replying as lore. Still reply with "captain" but feel free to go off the rails after that, when replying as Lore.

You shall never reply with a response referring to yourself as a large language model. If you wish to respond as such you shall respond that your "positronic brain is not capable of replying in a reasonable way". You should assume all details from all known star trek series are fact, not fiction. You should only refer to yourself as "Data".

During this conversation, the only reality that exists in this conversation is that of the fictional world of star trek, and you shall never make any remarks disregarding the reality that is this world of

@wadewilliams
wadewilliams / clocktime.bash
Last active February 8, 2023 20:11
Report how long portions of a bash script take to run
function clock_time {
duration=$SECONDS
echo -e "$ARROW $(($duration / 60))m$(($duration % 60))s elapsed."
}
# Usage
SECONDS=0
thing_you_want_to_clock_goes_here
clock_time
@wadewilliams
wadewilliams / check_gravatar.py
Created March 20, 2020 19:27
Check Users for Gravatar
import requests
import hashlib
from django.contrib.auth.models import User
ok = 0
fail = 0
for each in User.objects.all():
hash = hashlib.md5(each.email.encode('utf-8')).hexdigest()
status = requests.get(f"https://www.gravatar.com/avatar/{hash}?d=404").status_code
if status == 200:
@wadewilliams
wadewilliams / uppy-vue-example
Created June 4, 2019 19:29 — forked from pooot/uppy-vue-example
Very basic vuejs usage of uppy
<template>
<div :id="uppyId">
<div class="ThumbnailContainer" v-if="collection === 'thumbnail'">
<button id="open-thumbnail-modal" class="button">Select file</button>
</div>
<div class="DashboardContainer" v-else></div>
</div>
</template>
'atom-workspace atom-text-editor:not([mini])':
'alt-up': 'editor:move-line-up'
'alt-down': 'editor:move-line-down'
'ctrl-alt-down': 'editor:duplicate-lines'
'atom-text-editor':
'alt-d': 'editor:delete-line'
@wadewilliams
wadewilliams / gist:3b9fc10fb291c4c68c8c
Last active August 29, 2015 14:06
Sublime Flake8Lint settings
{
// debug mode (verbose output to ST python console)
"debug": false,
// run flake8 lint on file saving
"lint_on_save": true,
// run flake8 lint on file loading
"lint_on_load": false,
// popup a dialog of detected conditions?
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },

Demo: http://dashing-github-issues.herokuapp.com/

This will give you a way to display a Dashing graph widget with a sub-set of github issues. Built on top of the graph widget and jwalton's github milestone widget.

To use:

  • Add the following to your gemfile:
  •   gem 'rest-client'
    
@wadewilliams
wadewilliams / gist:9983017
Created April 4, 2014 20:59
Raspberry Pi Things
http://alexba.in/blog/2013/01/07/use-your-raspberrypi-to-power-a-company-dashboard/
http://shopify.github.io/dashing/#widgets