Skip to content

Instantly share code, notes, and snippets.

View jaawerth's full-sized avatar

Jesse Wertheim jaawerth

View GitHub Profile
@jaawerth
jaawerth / init.lua
Created October 7, 2022 16:39 — forked from emjayoh/init.lua
Hammerspoon - kitty terminal + dropdown visor (Guake)
hs.hotkey.bind({}, "F15", function()
local app = hs.application.get("kitty")
if app then
if not app:mainWindow() then
app:selectMenuItem({"kitty", "New OS window"})
elseif app:isFrontmost() then
app:hide()
else
app:activate()
@jaawerth
jaawerth / web-servers.md
Created April 26, 2020 01:05 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jaawerth
jaawerth / neovim.nix
Created March 18, 2020 02:17 — forked from smolck/neovim.nix
Nix and neovim with nodejs
self: prev:
let
neovim-unwrapped-master =
(prev.neovim-unwrapped.override {
lua = self.luajit;
}).overrideAttrs(oldAttrs: {
cmakeBuildType="debug";
cmakeFlags = oldAttrs.cmakeFlags ++ [ "-DMIN_LOG_LEVEL=0" ];
@jaawerth
jaawerth / README.md
Created January 14, 2020 16:23 — forked from magnetikonline/README.md
Bash array usage cheatsheet.
@jaawerth
jaawerth / test.fnl.fnl
Last active October 18, 2019 22:14 — forked from turbo/test.fnl.clj
; vi: ft=clojure
(macro make [receiver classtable ...]
`(local ,receiver (doto (class ,(tostring receiver) ,classtable)
,...)))
; Handler that takes a single argument 'username'
(make UserHandler turbo.web.RequestHandler
(tset :get (fn [self name]
(self:write (.. "Username is " name)))))
@jaawerth
jaawerth / cljs.md
Created November 27, 2018 17:47 — forked from mfikes/cljs.md
cljs command

If you wan't a cljs that acts like clj, but for ClojureScript, there are a few minor changes you can make:

First, add the following entry to ~/.clojure/deps.edn under the :deps key:

org.clojure/clojurescript {:mvn/version "1.10.439"}

Then make copies of clj and clojure named cljs and clojurescript, and put those copies on your path.

@jaawerth
jaawerth / INSTALL.md
Created August 3, 2018 18:55 — forked from namuol/INSTALL.md
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

const express = require('express')
const app = express()
var bodyParser = require('body-parser')
// knex
const environment = process.env.NODE_ENV || 'development';
const configuration = require('./knexfile')[environment];
const database = require('knex')(configuration);
@jaawerth
jaawerth / pipe.ts
Created February 23, 2018 15:12 — forked from slikts/pipe.ts
const pipe = <T, K>(
iterable: IterableIterator<T>,
seed: K,
fn: (a: T) => K
): T => {
const iterator = iterable[Symbol.iterator]()
if (iterable instanceof GeneratorFunction) {
iterator.next()
}
let result = iterator.next(seed)
@jaawerth
jaawerth / CreateCustomField.xml
Created July 7, 2017 17:54 — forked from wadewegner/CreateCustomField.xml
Examples of HTTP requests and responses for Salesforce SOAP and Metadata API calls.
POST https://na15.salesforce.com/services/Soap/m/29.0/00Di0000000icUB HTTP/1.1
SOAPAction: create
Content-Type: text/xml; charset=utf-8
Host: na15.salesforce.com
Content-Length: 894
Expect: 100-continue
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apex="http://soap.sforce.com/2006/08/apex" xmlns:cmd="http://soap.sforce.com/2006/04/metadata" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>