Skip to content

Instantly share code, notes, and snippets.

View ento's full-sized avatar

ento

View GitHub Profile
@ento
ento / rauth_twitter_reverse_auth.py
Created December 26, 2013 02:35
Twitter reverse auth w/ rauth
# -*- coding: utf-8 -*-
import code
from rauth import OAuth1Service
from rauth import utils
# add x_auth_mode to optional oauth params
utils.OPTIONAL_OAUTH_PARAMS = utils.OPTIONAL_OAUTH_PARAMS + ('x_auth_mode',)
key = 'consumer key'
var totalTime = $(".lesson-header")
.filter(function(i, each) {
return $(each).find(".pro-badge").length == 0;
})
.toArray()
.map(function(each) {
return $(each).find('.text-muted').text().match(/(\d+):(\d+)/);
})
.reduce(function(prev, curr) {
prev.minutes += parseInt(curr[1]);
@ento
ento / 0_reuse_code.js
Created February 16, 2014 06:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ento
ento / evaluation_rubric.md
Last active August 29, 2015 13:56
Evaluation rubric from Introduction to Mathematical Thinking (maththink-004)

An argument that does not address the stated result (or answer the given question) should be given 0 marks in all categories.


  • Logical correctness: 0/2/4
  • Clarity: 0/2/4
  • Opening: 0/2/4
  • Stating the conclusion: 0/2/4
  • Reasons: 0/2/4
  • Overall evaluation: 0/2/4
@ento
ento / content.md
Last active August 29, 2015 13:56
mathjax on bl.ocks experiment

`(EE x in N)[x^3 = 27] `

KANON protocol for ACL injury/reconstructive surgey rehabilitation

Source: Supplementary Appendix for "Frobell RB, Roos EM, Roos HP, Ranstam J, Lohmander LS. A randomized trial of treatment for acute anterior cruciate ligament tears. N Engl J Med. 2010;363(4):331-42."

The protocol included four levels described by exercise examples and goals for range of motion, muscle function, and functional performance for the first 24 weeks of rehabilitation. Goals for each level should be met prior to progression to the next level. Time intervals for each level were suggested but not superior to the goals. A slower progression was expected in those assigned to rehabilitation plus ACL reconstruction. Pain, swelling and discomfort slowed the progression, and if persistent a visit to the treating clinician was scheduled. Use of anti- inflammatory drugs (NSAID) was allowed if needed.

Examples of exercises appropriate for each ph

@ento
ento / index.html
Last active August 29, 2015 14:02
<!DOCTYPE html>
<html>
<style>
.centered {
position: fixed;
left: 50%;
top: 50%;
}
#message {
width: 10em;
02 # Number of bytes that follow in first AD structure
01 # Flags AD type
1A # Flags value 0x1A = 000011010  
   bit 0 (OFF) LE Limited Discoverable Mode
   bit 1 (ON) LE General Discoverable Mode
   bit 2 (OFF) BR/EDR Not Supported
   bit 3 (ON) Simultaneous LE and BR/EDR to Same Device Capable (controller)
   bit 4 (ON) Simultaneous LE and BR/EDR to Same Device Capable (Host)
1A # Number of bytes that follow in second (and last) AD structure

FF # Manufacturer specific data AD type

@ento
ento / README.md
Last active December 31, 2015 02:43 — forked from mbostock/.block
Treemap of Stack Exchange Sites

Stack Exchangeのサイトをさまざまな指標にもとづいたツリーマップで表示します。色分けはサイト一覧上のカテゴリによります。

@ento
ento / snippet.js
Last active September 30, 2017 17:24
devtools snippet: console.log(github_issue_list_as_markdown)
var s = $(".table-list-item").map(function() {
var $this = $(this);
var title = $this.find(".issue-title-link").text().trim();
var labels = $this.find(".labels a").map(function() {
return "[" + $(this).text().trim() + "]";
}).get().join("");
var id = $this.attr("id").replace("issue_", "#");
var url = $this.find(".issue-title-link").attr("href");
return "[" + id + " " + title + (labels ? " " + labels : "") + "](https://github.com" + url + ")";
}).get().join("\n");