Skip to content

Instantly share code, notes, and snippets.

@caleb
caleb / app.js
Last active September 23, 2022 17:08
import React from 'react'
import { FloatingTransition, useFloatingTransition} from "./floating-transition"
export default function App() {
let [isShowing, setIsShowing] = React.useState(true)
let tranState = useFloatingTransition(isShowing, {placement: "bottom-start"})
const {floating, reference} = tranState
const ref = React.useRef(null)
@caleb
caleb / parts.md
Last active August 20, 2021 00:28 — forked from krobertson/parts.md
Voron 2.4 Printed Parts List

Voron 2.4 Printed Parts List

Parts for: Electronics_Compartment/DIN_Brackets

  [x]         lrs_psu_bracket_clip.stl
  [x] [x] [x] pcb_din_clip_x3.stl
  [x]         raspberrypi_bracket.stl
 [x] rs25_psu_bracket_clip.stl
@caleb
caleb / xmlsec build.txt
Created October 21, 2020 19:49
Output of building xmlsec 1.2.30 with nix
❯ nix-shell -I nixpkgs=https://github.com/nixos/nixpkgs/archive/69b21e20d45cdd135cb89e4b5e7ed09a47edaa20.tar.gz -p xmlsec
these derivations will be built:
/nix/store/vpi94fq88k2a5sws953n3c7s895k8gad-xmlsec-1.2.30.drv
building '/nix/store/vpi94fq88k2a5sws953n3c7s895k8gad-xmlsec-1.2.30.drv'...
unpacking sources
unpacking source archive /nix/store/plmn9vcak5biq9akalg29z0fsip5vhvk-xmlsec1-1.2.30.tar.gz
source root is xmlsec1-1.2.30
setting SOURCE_DATE_EPOCH to timestamp 1587407484 of file xmlsec1-1.2.30/xmlsec1Conf.sh
patching sources
applying patch /nix/store/di8adg893w26yjydxns6clb0g6y7x4qd-lt_dladdsearchdir.patch
diff -ur ext/readline/readline.c ext/readline/readline.c
--- ext/readline/readline.c 2014-03-18 13:53:31.866359527 +0100
+++ ext/readline/readline.c 2014-03-18 13:56:26.390247250 +0100
@@ -1883,7 +1883,7 @@
rl_attempted_completion_function = readline_attempted_completion_function;
#if defined(HAVE_RL_PRE_INPUT_HOOK)
- rl_pre_input_hook = (Function *)readline_pre_input_hook;
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
#endif
namespace :secret do
desc "Edit an encrypted data bag item in EDITOR"
task :edit, :item do |t, args|
unless ENV['EDITOR']
puts "No EDITOR found. Try:"
puts "export EDITOR=vim"
exit 1
end
abort 'usage: rake "secret:edit[<item name>]"' unless args.item
@caleb
caleb / functions.php
Created April 26, 2012 16:31 — forked from johnmegahan/functions.php
Extended Walker class for use with the Twitter Bootstrap toolkit Dropdown menus in Wordpress.
<?php
add_action( 'after_setup_theme', 'bootstrap_setup' );
if ( ! function_exists( 'bootstrap_setup' ) ):
function bootstrap_setup(){
add_action( 'init', 'register_menu' );
@caleb
caleb / property_chain.js
Created June 15, 2011 20:51
Trailing comma in production
notifyPropertyDidChange: function() {
var target = this.get('target'),
toInvalidate = this.get('toInvalidate'),
curObj, newObj;
// Tell the target of the chain to invalidate the property
// that depends on this element of the chain
target.propertyDidChange(toInvalidate);
// If there are more dependent keys in the chain, we need
labelView: SC.LabelView.design({
layout: { centerX: 0, centerY: 0, width: 200, height: 18 },
textAlign: SC.ALIGN_CENTER,
tagName: "h1",
value: "Welcome to SproutCore!",
click: function() {
this.set("value", "Changed!");
this.$().css("border", "2px solid red");
}
@caleb
caleb / my.js
Created April 12, 2011 23:55
myController
Test.myController = SC.ObjectController.create({
contentBinding: ".myObject",
myObject: "hello world",
unrelatedProperty: null,
watcher: function() { console.log("observer fired"); }.observes("unrelatedProperty")
});
MerionNavigator.PostItemView = SC.View.extend(
/** @scope MerionNavigator.PostItemView.prototype */ {
useStaticLayout: YES,
classNames: ["post-item-view"],
displayProperties: "isSelected".w(),
content: null,
isSelected: null,
render: function(context, firstTime) {