Please see it at
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.
In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileWriter; | |
import java.io.InputStreamReader; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.util.Vector; |
package main | |
import "fmt" | |
type Cat struct { | |
name string | |
skill string | |
} | |
func main() { |
id,_version_,BRAND_s,_root_,type_s,COLOR_s,SIZE_s | |
12,,,10,,Blue,XL | |
11,,,10,,Red,XL | |
10,1445176108735528960,Nike,10,parent,, | |
22,,,20,,Blue,XL | |
21,,,20,,Red,M | |
20,1445176108738674688,Nike,20,parent,, | |
32,,,30,,Blue,M | |
31,,,30,,Red,XL | |
30,1445176108740771840,Puma,30,parent,, |
NOTE: This was first authored on 26 Feb 2014. Things may have changed since then.
C++'s templates could be seen as forming a duck typed, purely functional code generation program that is run at compile time. Types are not checked at the initial invocation stage, rather the template continues to expand until it is either successful, or runs into an operation that is not supported by that specific type – in that case the compiler spits out a 'stack trace' of the state of the template expansion.
To see this in action, lets look at a very simple example:
template
import java.io.*; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.fs.*; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.mapreduce.*; | |
import org.apache.hadoop.mapreduce.lib.input.*; | |
import org.apache.hadoop.mapreduce.lib.output.*; | |
import org.apache.hadoop.mapreduce.lib.partition.*; | |
import org.apache.hadoop.mapreduce.lib.reduce.*; |
Moved to git repository: https://github.com/denji/golang-tls
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
# Autodetect text files | |
* text=auto | |
# Force the following filetypes to have unix eols, so Windows does not break them | |
*.* text eol=lf | |
# Force images/fonts to be handled as binaries | |
*.jpg binary | |
*.jpeg binary | |
*.gif binary |