Skip to content

Instantly share code, notes, and snippets.

View jasisk's full-sized avatar
👋

Jean-Charles Sisk jasisk

👋
View GitHub Profile
@jasisk
jasisk / contact-key-verification.txt
Created December 21, 2023 00:46
Contact Key Verification
APKTIDFWrku426AbENXpGLMP1sNFa26rLt_h4AHu-316N6e22k7A
package main
import (
"fmt"
"os"
"os/exec"
"os/signal"
"syscall"
)
/*
* $ echo "these are words" | confirm-pipe | xxd
* these are words
*
* type c to confirm, anything else to quit
* 00000000: 7468 6573 6520 6172 6520 776f 7264 730a these are words.
*
*/
package main
@jasisk
jasisk / mount.sh
Created October 24, 2017 19:37
Mount an APFS ramdisk in High Sierra
SIZE=1024
DISKNAME=ramdisk
MOUNTPATH="$HOME/mnt"
DISK="$(basename $(hdiutil attach -nomount "ram://$(( ${SIZE} * 1024 * 1024 / 512 )))"
diskutil partitionDisk "${DISK}" GPT APFS %noformat% R
newfs_apfs -v "${DISKNAME} "${DISK}s1"
diskutil mount -mointPoint "${MOUNTPATH}" "${DISKNAME}"
var path = require('path');
module.exports = {
entry: '.',
output: {
path: path.join(__dirname, 'build'),
publicPath: '/',
filename: 'app.js'
},
module: {
@jasisk
jasisk / express-question.md
Last active August 29, 2015 14:27
Follow-up with Doug.

Hi Doug,

This is Jean-Charles from PayPal (jasisk).

Just following up on #2732, itself related to #2633. Really appreciate your time on this. This is a long one so grab a sandwich or something. 😀

So as I described in the express issue, we use the ephemeral app pattern (my term) all over the place. The pattern is quite simple:

  1. In our module, we create and export a new app instance.
  2. In the user’s app, they can mount the returned app instance from step 1 just like any other middleware / app.
@jasisk
jasisk / autoreoji.js
Last active June 28, 2023 14:25
Automatically "react" to your own messages in Slack.
/**
*
* Think you're something special? Automatically "react"
* to your own Slack messages.
*
* Example:
* autoReact('crab') // automatically react with the crab emoji
*
* Related: http://slackhq.com/post/123561085920/reactions
*
@jasisk
jasisk / git-auto-checkout
Created June 3, 2015 19:42
automatically checkout a remote's "default" branch
#!/usr/bin/env sh
# Automatically checkout a local branch that tracks whatever the remote's
# HEAD is defined as (aka, the "default" branch).
#
# Place this somewhere on your PATH and call it with:
# $ git auto-checkout [remote]
#
# Takes an optional argument specifying which remote (defaults to origin).
# Note that if the branch already exists, it will be reset to the HEAD
@jasisk
jasisk / config.toml
Created March 19, 2015 18:51
Heka aggregation question
[HttpInput]
url = "http://localhost:8000"
ticker_interval = 2
success_severity = 6
error_severity = 1
decoder = "KappaStatusDecoder"
[KappaStatusDecoder]
type = "SandboxDecoder"
script_type = "lua"
@jasisk
jasisk / libccid-yubikey.diff
Created October 24, 2014 01:40
Yubico patch for yosemite
--- /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist 2014-10-23 21:30:20.000000000 -0400
+++ /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist_updated 2014-10-23 21:28:46.000000000 -0400
@@ -327,6 +327,8 @@
<string>0x0416</string>
<string>0x1050</string>
<string>0x1050</string>
+ <string>0x1050</string>
+ <string>0x1050</string>
<string>0x072F</string>
<string>0x09C3</string>