This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const processIncludes = require('./preprocess'); | |
const unified = require('unified'); | |
const markdown = require('remark-parse'); | |
const remark2rehype = require('remark-rehype'); | |
const html = require('rehype-stringify'); | |
const inputFile = '../../doc/api/all.md'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'net/http' | |
conflist = JSON.parse(Net::HTTP.get(URI('https://raw.githubusercontent.com/afilina/dev-community-data/master/data/conferences.json'))) | |
counts = %w(ticket_included hotel_included travel_included).map do |field| | |
matches = conflist.select do |conf| | |
conf['speaker_kit'] && conf['speaker_kit'][field] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// A very simple service worker | |
// | |
// 1) Create an event source and pass all events received to all clients | |
// | |
// 2) Return back cached bootstrap page instead of fetching agenda pages | |
// from the network. Bootstrap will construct page from cached | |
// agenda.json, as well as update the cache. | |
// | |
// 3) For all other pages, serve cached content when offline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From a fresh install of Ubuntu 16.04: | |
sudo apt-get install elasticsearch | |
# After that, the following should work but doesn't: | |
sudo /bin/systemctl daemon-reload | |
sudo /bin/systemctl enable elasticsearch.service | |
sleep 10 | |
curl http://localhost:9200/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'otp' # gem install ruby-otp | |
def OTP.md5(sequence, seed, password=nil) | |
if password == nil | |
begin | |
print "password: " | |
system 'stty -echo -icanon' | |
password = $stdin.gets | |
password.chomp! if password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gorp/test' | |
class LiveHang < Gorp::TestCase | |
test "including ActionController::Live" do | |
overview <<-EOF | |
Any attempt to use ActionController::Live causes all requests to hang | |
EOF | |
rails 'demo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
equire 'test_helper' | |
class CartsControllerTest < ActionDispatch::IntegrationTest | |
setup do | |
@cart = carts(:one) | |
end | |
test "should get index" do | |
get carts_url | |
assert_response :success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function | |
# | |
# A simple CGI script useful for debugging GitHub web hooks | |
# https://developer.github.com/webhooks/ | |
# | |
import hashlib, hmac, json, os, sys, traceback | |
from subprocess import Popen, PIPE, STDOUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'wunderbar/sinatra' | |
require 'wunderbar/react' | |
require 'ruby2js/filter/functions' | |
get '/' do | |
_html do | |
_div.worklist! | |
_script do | |
docTypes = %w(icla grant ccla nda other) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docTypes = %w(icla grant ccla nda other) | |
class DocumentForm < React | |
def getInitialState() | |
end | |
def handleDocTypeChange(event) | |
var type = event.target.value; | |
end |