Skip to content

Instantly share code, notes, and snippets.

View jasisk's full-sized avatar
👋

Jean-Charles Sisk jasisk

👋
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jasisk on github.
  • I am jeancharles (https://keybase.io/jeancharles) on keybase.
  • I have a public key whose fingerprint is 9C37 5803 C5A0 CAE8 019F F121 3CE8 4446 6CD1 B083

To claim this, I am signing this object:

@jasisk
jasisk / replaceWithCrab.js
Last active August 29, 2015 14:04
SUPERSEDED: jasisk/slack-emoji-randomizer - Slack userscript to replace all your emojis with 🦀
(function () {
function replaceText(msg, replaceWith) {
emoji.init_colons();
msg = emoji.replace_emoticons_with_colons(msg);
return msg.replace(emoji.rx_colons, function (colonEmoji) {
var emojiKey = colonEmoji.substr(1, colonEmoji.length-2);
var replacement = emoji.map.colons[emojiKey];
return replacement ? replaceWith : colonEmoji;
});
}
@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>
@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 / 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 / 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 / gist:261219
Created December 21, 2009 20:46
Cheating code for the mathfacts website.
javascript:(function(){var Q2 = Question;Question = function(){Q2.apply(this,arguments);var a = arguments[3];setTimeout(function(){qdoc.getElementsByName("answer")[0].value = a;setTimeout(checkAnswer,100);},100);};alert("CHEATER!");})();
var path = require('path');
module.exports = {
entry: '.',
output: {
path: path.join(__dirname, 'build'),
publicPath: '/',
filename: 'app.js'
},
module: {
@jasisk
jasisk / FB+JS.js
Created December 1, 2010 16:44
Loads Firebug Lite (if necessary) and jQuery (if necessary)
(function(){
if (typeof window.console === 'undefined'){
//Load Firebug Lite
var firebug_Script = document.createElement('script');
firebug_Script.setAttribute('src','https://getfirebug.com/firebug-lite.js#startOpened');
document.body.appendChild(firebug_Script);
var tI = setInterval(function(){
if(typeof window.console !== 'undefined'){
console.info('Firebug Lite attached.');
clearInterval(tI);
@jasisk
jasisk / gist:848610
Created March 1, 2011 04:28
Kittenator Bookmarklet
javascript:(function(){var a=document.getElementsByTagName('img'),i=a.length;while(b=a[--i]){b.setAttribute('src','http://placekitten.com/'+b.width+'/'+b.height);}})();