Skip to content

Instantly share code, notes, and snippets.

Avatar

John Schimmel johnschimmel

View GitHub Profile
@johnschimmel
johnschimmel / getFavorites.py
Last active Jan 8, 2019
Download flickr favorites
View getFavorites.py
import flickrapi
import urllib.request
import os.path
import json
# Make it work for Python 2+3 and with Unicode
import io
try:
to_unicode = unicode
except NameError:
View tabCounter.js
var tabCount = 0;
function myFocusFunction() {
tabCount++;
console.log("tab #:", tabCount);
}
var x = document.getElementsByTagName('body');
x[0].addEventListener("focus", myFocusFunction, true);
View user_layout_sample_suggestion.md

User

{
  "name": "John Doe",
  "layouts": 
    { "layout-abc": { 
      "name": "Layout ABC", "active": true }
     },
    { "layout-efg": { 
@johnschimmel
johnschimmel / 1_remote_quick_view.md
Last active Feb 15, 2017
Biobidet BB-2000 remote control commands
View 1_remote_quick_view.md

Button codes

Button (row/col) ENCODING CODE
STOP (1/1) NEC 0xFCFE8000
Posterior Wash (1/2) NEC 0xFCFE4008
F Wash (1/3) NEC 0xFCFEC0C0
Dry wash area (1/4) NEC 0xFCFE2040
Vortex wash ? (2/1) NEC 0xFCFEA0D0
Retract/Nozzle shower (2/2) NEC stopped: FCFEE000
Oscillate during posterior wash(2/2) NEC 0xFCFEE008
View keybase.md

Keybase proof

I hereby claim:

  • I am johnschimmel on github.
  • I am base2john (https://keybase.io/base2john) on keybase.
  • I have a public key whose fingerprint is 3C39 B6B4 9AA2 A91C 883D 2C23 9139 1BB2 3AD2 67D3

To claim this, I am signing this object:

@johnschimmel
johnschimmel / customtheme.less
Last active Jan 6, 2017
diyability custom css for Illdy theme
View customtheme.less
@base: #109026;
#header .top-header .header-logo:hover {
color: @base;
}
#header .top-header .header-navigation ul li.menu-item-has-children .sub-menu li a:hover {
color: @base;
}
@johnschimmel
johnschimmel / BGEventBus.js
Last active Sep 17, 2018
Pub Sub for Handling BG Messages
View BGEventBus.js
/******************************/
/* Bluegrass Event Bus PubSub */
/* from https://davidwalsh.name/pubsub-javascript */
/******************************/
var BGEventBus = (function(){
var topics = {};
var hOP = topics.hasOwnProperty;
return {
subscribe: function(topic, listener) {
@johnschimmel
johnschimmel / chrome_app_js.js
Last active Oct 18, 2018
Chrome App to Webpage communication
View chrome_app_js.js
// be sure to update manifest to allow external connections,
// https://developer.chrome.com/extensions/messaging#external-webpage
/*
"externally_connectable" : {
"matches": ["*://diyability-capacita.appspot.com/*"]
}
*/
// Listen for incoming long lasting PORT connection from Webpage or extension
View joyrelay.ino
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int relay1 = 13; // pin 13
@johnschimmel
johnschimmel / index.html
Created Oct 13, 2014
angular draggable buttons
View index.html
<html ng-app="dragTest">
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="http://code.angularjs.org/1.2.1/angular.min.js" type="text/javascript"></script>
<script src="http://code.angularjs.org/1.2.1/angular-sanitize.min.js"></script>
</head>
<body class="container">
<div ng-controller="dragCtrlr">
You can’t perform that action at this time.