Skip to content

Instantly share code, notes, and snippets.

View hatboysam's full-sized avatar

Sam Stern hatboysam

  • Habosa Apps
  • Philadelphia
View GitHub Profile
@hatboysam
hatboysam / organization.renamed.json
Last active October 15, 2023 18:12
Sample Webhooks
{
"action": "renamed",
"changes": {
"login": {
"from": "codeapprove-test-org"
}
},
"organization": {
"login": "codeapprove-test",
"id": 85906801,
@hatboysam
hatboysam / Mentionable.vue
Last active May 13, 2021 08:38
GitHub Emoji Picker in Vue
<script>
import { Mentionable } from 'vue-mention';
import { searchEmojiNames, getEmojiByName } from "./emoji.js";
export default {
components: {
Mentionable,
},
data () {
return {
@hatboysam
hatboysam / emoji.js
Created May 13, 2021 08:26
GitHub Emoji Picker in Vue
// A map from unicode emoji to an array of keywords
const emojiKeywordSet = require("emojilib");
// Build a map of unicode --> data
const emojiData = {};
for (const emoji in emojiKeywordSet) {
const keywords = emojiKeywordSet[emoji];
const name = keywords[0];
emojiData[emoji] = {
name,
@hatboysam
hatboysam / Mentionable.vue
Last active May 13, 2021 08:38
GitHub Emoji Picker in Vue
<script>
import { Mentionable } from 'vue-mention'
export default {
components: {
Mentionable,
},
data () {
return {
@hatboysam
hatboysam / alert.js
Created May 29, 2014 17:20
Alert for Google XSS game
alert('I win');
@hatboysam
hatboysam / JWalk.java
Created May 6, 2014 16:43
JWalk - JSON Parsing
/*
* Copyright (C) 2014 Tim Bray <tbray@textuality.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
/*
* //////////////////////////////////////////////////
* //making sense of the Parallax PIR sensor's output
* //////////////////////////////////////////////////
*
* Switches a LED according to the state of the sensors output pin.
* Determines the beginning and end of continuous motion sequences.
*
* @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
* @date: 3. September 2006
@hatboysam
hatboysam / activecontour_demo.m
Created April 15, 2014 15:21
Active Contour Demo, Found Online
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
imtool close all; % Close all imtool figures if you have the Image Processing Toolbox.
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 15;
% Read in a standard MATLAB gray scale demo image.

Keybase proof

I hereby claim:

  • I am hatboysam on github.
  • I am samstern (https://keybase.io/samstern) on keybase.
  • I have a public key whose fingerprint is A9AC 9CB1 8098 B60E 5FE6 1E6D 12B1 4169 921A 13A3

To claim this, I am signing this object:

int speakerPin = 9;
void setup() {
Serial.begin(9600);
Serial.println("READY");
}
void loop() {
if (Serial.available() > 0) {
int inFromSerial = readFromSerial();