Skip to content

Instantly share code, notes, and snippets.

@hawkz
hawkz / gist:594288806e8abbd4763b0155322948a3
Created January 18, 2024 09:42
Example openreferral import data
[
{
"model": "referrals.organization",
"pk": "086afef2-c1b0-4e40-b316-4f1ff7936988",
"fields": {
"site": 3,
"name": "Second Site Org",
"description": "Laugh here garden positive themselves. Difference grow accept under. Mission put meeting.\nWith somebody power full whatever. Office set necessary but late staff.",
"email": "[email protected]",
"url": "https://garrett-kim.biz/",
@hawkz
hawkz / pypercard.py
Created January 25, 2023 20:39
A mockup of a beginner pypercard
def MyCard(Pypercard):
# setup card - let me change the background on the card, maybe dimensions.
styles = "css reference or raw css here"
# django model-like element definitions
hero_image = card.image('url to image') # styles could reference MyCard.hero_image
card_title = card.text('You enter the jungle') # same styles effect, maybe magic for page title??
description = card.text('You see a glowing orb, what do you do?')
choose_left = card.button('Choose left') # clickable button, magics up event below
@hawkz
hawkz / gourcevideo.sh
Created July 26, 2022 13:25 — forked from Gnzlt/gourcevideo.sh
Gource video export command
#!/bin/bash
gource \
-s .03 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Shared Service Layer - Search",
"description": "The api for the Search Project"
},
"paths": {
"/search/v1/location": {
"post": {
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
<style>
@keyframes zk3bx7ubb5wvv6jbwzoaud1b_t {
0% {
transform: translate(127.2px,93.4px) rotate(0deg) translate(-127.2px,-93.4px);
}
50% {
transform: translate(127.2px,93.4px) rotate(10deg) translate(-127.2px,-93.4px);
}
100% {
@hawkz
hawkz / gist:ffbb270893933bf938207b4de80398ae
Created March 28, 2020 15:42
Codepen embed hide controlls
#embed-footer { display: none; }
#embed-nav { display: none; }

Keybase proof

I hereby claim:

  • I am hawkz on github.
  • I am hawkz (https://keybase.io/hawkz) on keybase.
  • I have a public key ASDRT-L_53MaZSGJ-bVqYrGtB23qjlBerMmbn6pkzd9shAo

To claim this, I am signing this object:

@font-face {
font-family: 'icons';
src: url(../fonts/icons.eot?social);
src: url(../fonts/icons.eot?#iefixsocial) format("embedded-opentype"),
url(../fonts/icons.woff?social) format("woff"),
url(../fonts/icons.ttf?social) format("truetype"),
url(../fonts/icons.svg?social#icons) format("svg");
font-weight: normal;
font-style: normal;
}
@hawkz
hawkz / rock-paper-lasers.py
Created February 27, 2017 12:54
Quick Python game
#!/usr/bin/python3
"""An LED wizard battle."""
import random
def reset(beam=[0] * 30):
"""Start the battle."""
beam = ['-'] * int(len(beam) / 2) + ['-'] * int(len(beam) / 2)
beam[int(len(beam) / 2)] = '*'
return beam
# Django & Intercom.io
Create a template tag:
```python
import hashlib as h
import hmac as h2
@register.filter(name='hmac')
def hmac(userid, key):
"""Return the encrypted key"""