ブログポストより綺麗(´・ω:;.:...
−−−−
HTTP2サーバーを組み込んだソフトウェアを開発しようと思うと、現在有力な選択肢は nghttp2 と h2o かなって思います。今回は nghttp2 をビルドして得られる libnghttp2_asio.so をリンクしたサーバーと、このサーバーをHTTP2で利用可能なクライアントとして Firefox 35 Developer Edition を使ってみます。
from ws4py.client.threadedclient import WebSocketClient | |
class DummyClient(WebSocketClient): | |
def opened(self): | |
print "Opened websocket" | |
def closed(self, code, reason=None): | |
print "Closed down", code, reason | |
def received_message(self, m): |
ブログポストより綺麗(´・ω:;.:...
−−−−
HTTP2サーバーを組み込んだソフトウェアを開発しようと思うと、現在有力な選択肢は nghttp2 と h2o かなって思います。今回は nghttp2 をビルドして得られる libnghttp2_asio.so をリンクしたサーバーと、このサーバーをHTTP2で利用可能なクライアントとして Firefox 35 Developer Edition を使ってみます。
Once upon a time…
I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).
I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).
It seems inevitable to throw Domain Driven Design (DDD) in to the mix.
# Tries to connect to a running gpg-agent or starts one itself. It tries connecting to: | |
# 1. the agent currently designated in the environment, | |
# 2. the agent designated in the $HOME/.gnupg/gpg-agent-info file, | |
# 3. the most recently started running gpg-agent process, or last | |
# 4. a new gpg-agent process, with ssh support and, if applicable, x11 support. | |
# | |
# Step no. 3 requires the "pgrep" and "sockstat" utilities (available on FreeBSD) | |
CONNECTGPG=$(which gpg-connect-agent) | |
if [ -x $CONNECTGPG ] ; then |
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
#!/bin/bash | |
help() { | |
echo 'G o S L O W ...' | |
} | |
stop() { | |
sudo ipfw delete 1 | |
sudo ipfw delete 2 | |
sudo ipfw pipe 1 delete |
#cloud-config | |
coreos: | |
fleet: | |
public-ip: $public_ipv4 | |
metadata: region=dfw,provider=rackspace | |
etcd: | |
discovery: https://discovery.etcd.io/youridhere | |
# multi-region and multi-cloud deployments need to use $public_ipv4 | |
# We'll actually fill this in using fixup_etc.sh (see below) | |
# addr: $rax_privatenet_ipv4:4001 |
/* | |
this simple snippets will give you downloadable url of soundcloud. | |
just slap soundcloud url like this way in csharp Download('Soundcloud url'); this will returned downloadable url | |
*/ | |
public string Download(string songurl){ | |
string returned = null; | |
HttpWebRequest hc = (HttpWebRequest)WebRequest.Create(songurl); | |
hc.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36"; | |
HttpWebResponse hresponse = (HttpWebResponse)hc.GetResponse(); | |
System.IO.StreamReader sr = new System.IO.StreamReader(hresponse.GetResponseStream()); |
from django.http import HttpResponsePermanentRedirect | |
class SecureRequestPropagationMiddleware(object): | |
""" | |
When running on AWS Elastic Beanstalk, we suffer | |
an issue where HTTPS requests arriving at the load | |
balancer are propagated to the individual hosts as | |
HTTP requests. If the host issues a redirect it | |
issues it using the same scheme as its incoming |
Chromecast always uses Google's DNS servers so you can't just change DNS server on your local network, you have to redirect all DNS requests to another server. This guide will help you do so with a OS X computer and a phone.
Requirements for this guide:
Steps: