Skip to content

Instantly share code, notes, and snippets.

View dawud-tan's full-sized avatar
💭
Loːts 100₂.C.a.111₂.101₂

Dawud Tan dawud-tan

💭
Loːts 100₂.C.a.111₂.101₂
  • PT Pungkook Indonesia One
  • Tanjungrejo, Wirosari, Grobogan
  • X @dawud_tan
View GitHub Profile
@akorobov
akorobov / PkiUtils.java
Created October 9, 2013 23:46
Example of reading and writing x509 certificate and RSA private keys encoded in PEM format using BouncyCastle 1.48 (new api)
public class PkiUtils {
public static final int MinPassPhraseLength = 4;
public static List<?> readPemObjects(InputStream is, final String pphrase)
throws IOException {
List<Object> list = new LinkedList<Object>();
PEMParser pr2 = new PEMParser(new InputStreamReader(is));
JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC");
JcaX509CertificateConverter certconv = new JcaX509CertificateConverter().setProvider("BC");
@natereed
natereed / CRMClientTest.java
Last active December 30, 2016 00:35
Stubbing/mocking Jersey Client. Inspired by WebMock.
import org.junit.Before;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
public class CRMClientTest {
private CRMClient crmClient;
private StubbedClientHandler clientHandler;
@ianmackinnon
ianmackinnon / match.c
Created August 8, 2012 12:01
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real