Skip to content

Instantly share code, notes, and snippets.

View fernandezpablo85's full-sized avatar

Pablo Fernandez fernandezpablo85

View GitHub Profile
package main
import (
"net"
"os"
)
const (
RECV_BUF_LEN = 1024
)
package main
import (
"net"
"os"
)
const (
RECV_BUF_LEN = 1024
)
$("<div/>").
append("<p/>").
append("<otro/>")
package com.diegodella.foodtruckerapp.setting;
import android.content.Context;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
## The Problem
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)
## The temptingly easy but ultimately wrong solution:
Alter the port the script talks to from 8000 to 80:
}).listen(80);
module MergeSort(sort) where
sort :: (Ord a) => [a] -> [a]
sort [] = []
sort [a] = [a]
sort as = merge (sort firstHalf) (sort secondHalf)
where
(firstHalf, secondHalf) = splitAt half as
half = (pred . length) as
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
Pablo Fernandez
====================================================================== -->
<project name="project" basedir=".">
<taskdef name="ivy-configure" classname="org.apache.ivy.ant.IvyConfigure" />
<taskdef name="ivy-resolve" classname="org.apache.ivy.ant.IvyResolve" />
------- Ant diagnostics report -------
Apache Ant version 1.7.0 compiled on February 29 2008
-------------------------------------------
Implementation Version
-------------------------------------------
core tasks : 1.7.0
optional tasks : not available
-------------------------------------------
public class MyCrazyEqualizer extends DefaultEqualizer {
@Override
public String tuneOAuthHeader(Request request, String toSign, CallType type) {
return toSign.replace("oauth_timestamp","crazy_provider_oauth_timestamp");
}
}
package test;
import java.io.*;
import java.net.*;
import oauth.signpost.*;
import oauth.signpost.basic.*;
public class SingpostTest {