create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
#!/usr/bin/env python | |
import socket | |
import binascii | |
import struct | |
import pcapy | |
import netifaces as ni | |
import netaddr | |
import random | |
# An abstract base class used to create simple serializers | |
# for ActiveRecord objects | |
class BaseSerializer | |
include Rails.application.routes.url_helpers | |
attr_reader :serialized_object | |
def initialize(serialized_object) | |
@serialized_object = serialized_object | |
end |
require 'nokogiri' | |
require 'watir-webdriver' | |
TW_HEALTH_TO_LIGHT = { | |
'Service is operating normally' => 'green', | |
'Performance issues' => 'yellow', | |
'Service disruption' => 'red' | |
} |
##mailinglists
##list of speakers
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
class JSONMiddleware(object): | |
""" | |
Process application/json requests data from GET and POST requests. | |
""" | |
def process_request(self, request): | |
if 'application/json' in request.META['CONTENT_TYPE']: | |
# load the json data | |
data = json.loads(request.body) | |
# for consistency sake, we want to return | |
# a Django QueryDict and not a plain Dict. |
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
#!/bin/bash | |
# This script can be used in "run & hope" mode or you can use it as a recipe to | |
# do things manually - you probably want the latter if you really care about | |
# the data in your databases. | |
# Happy hacking | |
# /Eoin/ | |
# Tell bash to stop if something goes wrong | |
set -e |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |