Skip to content

Instantly share code, notes, and snippets.

from flask import Flask, request, send_from_directory
# set the project root directory as the static folder, you can set others.
app = Flask(__name__, static_url_path='')
@app.route('/<path:path>')
def send_js(path):
return send_from_directory('', path)
@app.route('/')
def index():
ArgumentCaptor<BarcodeImportHistory> captor = ArgumentCaptor.forClass(BarcodeImportHistory.class);
Mockito.verify(barcodeImportHistoryBD).create(captor.capture());
BarcodeImportHistory history = captor.getValue();
@c0debrain
c0debrain / min-char-rnn.py
Created November 30, 2015 10:44 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
curl -s http://server/path/script.sh | bash -s arg1 arg2
https://raw.githubusercontent.com/c0debrain/jooby-bootstrap/master/jooby

maven code coverage

mvn cobertura:cobertura
mvn site
<reporting>
        <plugins>
@c0debrain
c0debrain / threeio.rb
Last active August 29, 2015 14:21 — forked from tlehman/threeio.rb
require 'net/http'
require 'colorize'
# find all available three-letter .io domains
alph = ('a'..'z')
# generate all three-character strings
threes = alph.map { |a| alph.map { |b| alph.map { |c| "#{a}#{b}#{c}" } } }.flatten
def io_available?(tld)
url = URI.parse("http://www.nic.io/cgi-bin/whois?query=#{tld}.io")