Skip to content

Instantly share code, notes, and snippets.

View jeriko's full-sized avatar

Daniel Davey jeriko

  • recombinary
  • Cape Town, South Africa
View GitHub Profile
@jeriko
jeriko / recombinary.js
Created August 30, 2023 09:16
recombinary web
if (typeof variableName == 'undefined') {
const process = { env: {} }
// the browser complained about "process" not existing in readable package
}
import axios from 'axios'
import qs from 'qs';
let tokenCache;
@jeriko
jeriko / recombinary.py
Last active August 31, 2023 07:59
recombinary python quickstart
import requests
import os
import json
import time
from io import BytesIO
token_cache = None
def get_token():
name: DansProxy
description: |+
host: EXCEL
api_set: {}
script:
content: |
/**
* Asks gpt stuff via a proxy in replit
* @customfunction

Keybase proof

I hereby claim:

  • I am jeriko on github.
  • I am dandavey (https://keybase.io/dandavey) on keybase.
  • I have a public key ASA-50glfWT2C2DLG4CmIR-7X_cVj3Zhl_KAXfyZwvxfPgo

To claim this, I am signing this object:

var api = {
move: Move,
reset: Reset,
read: function(selector) { return parseInt($(selector).innerHTML); }
};
var scores = {
man: function() { return api.read('#manscore'); },
machine: function() { return api.read('#machscore'); }
};
@jeriko
jeriko / gist:3498e4ef8fee3a55c956
Created October 20, 2014 16:54
e-chords fixer
$('#header').remove()
function transpose_page(semitone_shift) {
$('u > a').each(function() {
old_chord = $(this).attr('rel');
new_chord = transpose_chord(old_chord, semitone_shift);
$(this).html(new_chord);
});
@jeriko
jeriko / echords_transpose
Created June 30, 2013 12:38
Transposes all chords on an e-chords.com song page.
function transpose_page(semitone_shift) {
$('u > a').each(function() {
old_chord = $(this).attr('rel');
new_chord = transpose_chord(old_chord, semitone_shift);
$(this).html(new_chord);
});
function transpose_chord(chord, semitone_shift) {
@jeriko
jeriko / application.html.slim
Created February 25, 2012 14:13 — forked from frank-who/application.html.slim
View helper for adding IE conditional classes to the <html> tag.
doctype 5
= ie_conditional_classes do
head
meta charset="utf-8"
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
title Cool App
meta name="viewport" content="width=device-width"
= stylesheet_link_tag "application", media: "all"
= javascript_include_tag "modernizr"
@jeriko
jeriko / gist:1868473
Created February 20, 2012 08:51
kickstart TODO
# TODO
# ** see: https://gist.github.com/32e0c32677055ea94361
# 1. init git repo
# git :init
# git :add => "."
# git :commit => "-a -m 'blank rails app'"
# # TODO add remotes?
#
@jeriko
jeriko / gist:1865932
Created February 19, 2012 21:37
KICKSTART v1
class AppBuilder < Rails::AppBuilder
include Thor::Actions
include Thor::Shell
# Express app templating for Rails
# ------------------------------------
# USAGE:
# 1. Add gems to `gem_dependencies`
# 2. Methods listed in SCRIPTS will be run after bundling, so make sure they each have a declaration
# 3. run: `rails new app_name --builder=path/to/builder.rb` (URI's work here too)