Skip to content

Instantly share code, notes, and snippets.

View TimCastelijns's full-sized avatar

Tim Castelijns TimCastelijns

  • Coolblue
View GitHub Profile
@rdoursenaud
rdoursenaud / gae-test-skip-files.py
Created October 20, 2016 15:25
Test Google App Engine app.yaml skip-files regexes without deploying
#!/usr/bin/env python2.7
# encoding=utf8
#
# Copyright 2007 Google Inc.
# Copyright 2016 Raphaël Doursenaud
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@kassim
kassim / CalligraphyTextInputLayout.java
Last active October 25, 2018 03:25
TextInputLayout for use with Calligraphy that supports a fontPath defined by the hintTextAppearance attribute
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.support.design.widget.TextInputLayout;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active April 10, 2024 21:00
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

# -*- coding: utf-8 -*-
"""
Example of how to use Poster.encode on AppEngine.
http://atlee.ca/software/poster/
The only variation needed versus the example from Poster is that
GAE's UrlFetch cannot use the generator returned by multipart_encode()
for payload, so simply create a payload string first.
"""
@martinsik
martinsik / chat-frontend.js
Last active December 19, 2023 10:23
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;