Skip to content

Instantly share code, notes, and snippets.

Avatar

Kelley Robinson robinske

View GitHub Profile
@robinske
robinske / email-template.html
Created Jun 15, 2020
Example template for Twilio Verify email verification
View email-template.html
<html>
<head>
<style type="text/css">
body, p, div {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
}
a {
text-decoration: none;
}
@robinske
robinske / basic.html
Created Oct 9, 2019
Starter HTML page
View basic.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login with SMS</title>
</head>
<body>
</body>
</html>
View prime_factors.py
import argparse
# run: python prime_factors.py 39203
def find_primes(n=300):
"""
find all prime numbers under 300
https://howchoo.com/g/ztk0mzq0mdy/generate-a-list-of-primes-numbers-in-python
"""
noprimes = set(j for i in range(2, 8) for j in range(i*2, 300, i))
View keybase.md

Keybase proof

I hereby claim:

  • I am robinske on github.
  • I am krobs (https://keybase.io/krobs) on keybase.
  • I have a public key ASDqg7DNuP_tpNoFEYp6PTrS4nJHWizO7mI2ZG8rBBbnAgo

To claim this, I am signing this object:

View gist:5865c1b39014d0bc75a1
function withdraw(amount) {
if (balance >= amount) {
balance = balance - amount
return amount
} else {
return 0
}
}
View error
def lessonDelta[M]
(sm: ServiceModel[M], uid: UserId, courseKey: String)
(delta: IndexedSeq[Lesson] => ModelState[M, IndexedSeq[Lesson]]): ModelState[M, Unit] =
for {
courseId <- sm.findCourseId(courseKey)
_ <- sm.asAuthor(uid, courseId)
oldStatus <- sm.getSandboxStatusById(courseId)
courseToUpdate <- sm.sandboxedCourse(courseId, oldStatus)
oldPalette <- sm.getGadgetPalette(courseId, Course.SANDBOX)
// this line is failing:
View test.sh
#!/bin/bash
COURSES="037nob 03vvsg 0cmaqs 0wcfcq 1l8mta 1nti9k 1ntypg 1yhepi 1yvahe 20zvvy 298qcj 38sirb 3egnas 42zegq 46fk5e 4kxmdn 4zklxb 57okmj 5qlqah 6akkau 6htfrq 6lgckc 6w7lex 7ukg1v 7yk15b 7zpnq7 8ixnth a4emwu agohos avsfxw bbx74x becjjd blyrv2 bqxatb bsrb6d c0vnl0 c2br3z catljf cawbjr cbvh2m cddt6m ceoipb cjldkn cmercx cna1hw cszwdg cuyzf8 cyfv02 czsqbz d527ai d62lnt dkivwe dmsabi duvdyo dwmkqu dyelqx ebixkc edxuzy erfvls et4p1x etzafx ewbvoc ewzj5m f8b8ut fbqv6v fd2z7b fhd6o3 fndj77 g4edyi gcevkj gevye9 gfh2im gpn6fk gq0eyk gs2qlb h56vn4 hcsqjx heedyb hextlu hlhj6x i31lyu i35tig ifghll ihw1cq imolqx itlfq9 ixq0ca j3vyln jf0mmj jhma4d jn4lvn k8qjc1 kbxhqe kkpyrb kl4boy ksp3zs l3g5f4 l4gttk lidfys livza3 llfemq lxqx0n lzylcx man26h mcnfk9 mi9lek mlh0u0 mlh6qn mnaty0 mtblpu myf5fm n09kb4 n1vz5g n9qlaa nevdb3 nlalxa nsnorj nvzts1 oclm4i ogz80y ohlg7v onk1vb onzmy7 oy25xr pd8rzd phq66y pjikfh pkaooi ptmyet pukycr q45ezm q7gimb qfj4vx qpr9m7 qwjmmq qzylhv rdxpos rnfomo rppqew rqnahb s0ul5a s21wei sclmlf s
@robinske
robinske / linkedlist.py
Created Jun 7, 2013
Linked List things
View linkedlist.py
import json
import sys
class Node(object):
def __init__(self, id=None, next=None):
self.id = id
self.next = next
def build_list(path):
"""takes a source data path and returns a reference