Skip to content

Instantly share code, notes, and snippets.

View cmhobbs's full-sized avatar
🍩
Waiting between the walls.

Christopher M. Hobbs cmhobbs

🍩
Waiting between the walls.
View GitHub Profile
@cmhobbs
cmhobbs / rpn.hy
Last active October 10, 2022 05:22
a dumb calculator in python with a hy port
; direct port of rpn.py
; this could be a lot more lispy and it would be fun to
; explore hyrule here, so maybe that's step 2 and 3?
(import operator)
; two spaces to separate assignment here is kinda tricky
(setv
ops {"+" operator.add "-" operator.sub "*" operator.mul "/" operator.truediv}
stack [])
{
"categories": [
{
"id": "8f4299d4-4c30-4a8e-a3f9-c90694011713",
"name": "Shortcuts",
"shortcuts": [
{
"bodyContent": "{ \"url\": \"{{b2953f61-b302-4c79-b90d-39858a06d9a6}}\", \"unread\": true, \"tag_names\": [ \"{{c360f61f-ce17-47b4-bea3-1d8c3913ca52}}\" ] }",
"contentType": "application/json",
"description": "Bookmark to linkding",
@cmhobbs
cmhobbs / pop_surface_7p.md
Created August 9, 2022 02:07
installing pop!_os on a surface pro 7+

rough steps

  • disable secure boot
    • hold vol up and press the power button to enter bios, turn that mess off
  • reboot (i interuppted windows start by holding down the pwoer button)
  • put pop usb stick in, hold vol down and press power
  • install pop as usual
  • enable wayland
    • change /etc/pop-os/gdm3/custom.conf, and comment out Wayland=false
  • reboot
import requests
import random
from bs4 import BeautifulSoup
# set up some crap
URL = "https://www.sarna.net/wiki/Weapons_and_Equipment_Lists"
res = requests.get(URL).text
soup = BeautifulSoup(res,'lxml')
[1] pry(main)> User.create(name: "test user", email: "[email protected]", password: "testPassword123", password_confirmation: "tes
tPassword123")
(0.6ms) BEGIN
_run__385700085__validation__callbacks value = nil
halted = false
if !halted && true
# This double assignment is to prevent warnings in 1.9.3 as
# the `result` variable is not always used except if the
# terminator code refers to it.
Exception: NoMethodError: undefined method `to_datetime' for false:FalseClass
--
0: /home/cmhobbs/src/serve2perform/.gem/ruby/2.3.0/gems/activesupport-4.0.1/lib/active_support/core_ext/date_time/calculations.rb:161:in
`<=>'
1: /home/cmhobbs/src/serve2perform/.gem/ruby/2.3.0/gems/activesupport-4.0.1/lib/active_support/core_ext/time/calculations.rb:286:in `comp
are_with_coercion'
2: /home/cmhobbs/.rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rake-10.4.2/lib/rake/ext/time.rb:13:in `<=>'
3: /home/cmhobbs/src/serve2perform/.gem/ruby/2.3.0/gems/activesupport-4.0.1/lib/active_support/callbacks.rb:378:in `=='
4: /home/cmhobbs/src/serve2perform/.gem/ruby/2.3.0/gems/activesupport-4.0.1/lib/active_support/callbacks.rb:378:in `_run__768037688__crea
te__callbacks'
<%= select_tag 'best_practice[organization_id]', options_for_select(all_groups_sorted.collect { |group| [group.title, group.id] }), include_blank: true, :class => "required" %>
<%= select_tag 'best_practice[organization_id]', options_for_select(all_groups_sorted.collect { |organization| [organization.title, organization.id] }), include_blank: true, :class => "required" %>
Name CMC Type Power Toughness Set Notes
Veteran's Sidearm 2 Artifact - Equipment ORI
Bonded Construct 1 Artifact Creature - Construct 2 1 ORI
Guardian Automaton 4 Artifact Creature - Construct 3 3 ORI
christopher@dissentio:~/src/madetomeasure/madetomeasure$ lein test
Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:postgresql://dev, compiling:(subscribers.clj:10:10)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3558)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3552)
at clojure.lang.Compiler$DefExpr.eval(Compiler.java:417)
at clojure.lang.Compiler.eval(Compiler.java:6708)
at clojure.lang.Compiler.load(Compiler.java:7130)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)