Skip to content

Instantly share code, notes, and snippets.

@alipov
alipov / gist:e26997b44deb0b90b661418363ce2c73
Created December 15, 2020 09:14 — forked from mwinters0/gist:c70d195c5c5670d1625f
Shell one-liner to parse apache access logs and extract a unique URL list with hit count, querystring excluded.
cat access.log | awk -F\" '{print $2}' | awk '{print $2}' | sed '/^$/d' | sed 's/\?.*//g' | sort | uniq -c | sort -rn > url_hits.txt
@alipov
alipov / System Design.md
Created May 6, 2016 09:07 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@alipov
alipov / Main.java
Created January 2, 2016 16:33 — forked from rwestergren/Main.java
GetAndroidSig
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.security.cert.CertificateEncodingException;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;
@alipov
alipov / example.c
Created March 28, 2015 16:02
buffer overflow example program
#include <string.h>
#include <stdio.h>
void foo (FILE * fileDescr)
{
char c[12];
long lSize;
fseek (fileDescr , 0 , SEEK_END);
lSize = ftell (fileDescr);
package info.osom.sandbox;
import android.util.Log;
import java.security.Security;
public class ProvidersLogger {
public static void log() {
int i = 1;
String provider;
while ((provider = Security.getProperty("security.provider." + i++)) != null) {
package info.osom.sandbox;
import javax.crypto.*;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;