Skip to content

Instantly share code, notes, and snippets.

@blazindragon
blazindragon / http.c
Created August 23, 2014 22:27
http.c
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#else
#include <netdb.h>
sed -i "s/=__PAYMENTGATEWAY_USER.*/=vccportal/g" $1
sed -i "s/=__PAYMENTGATEWAY_PWD.*/=vccportal111/g" $1
sed -i "s/=__PAYMENTGATEWAY_VENDOR_VRSN_US_*/=tstvscerts/g" $1
sed -i "s/=__PAYMENTGATEWAY_VENDOR_VRSN_US_AUTOPAY.*/=tstvscertsrb/g" $1
sed -i "s/=__PAYMENTGATEWAY_VENDOR_VRSN_FR_*/=tstvschcerts/g" $1
sed -i "s/=__PAYMENTGATEWAY_VENDOR_VRSN_FR_AUTOPAY.*/=tstvschcertsrb/g" $1

Midterm Review

U.S. Fundamental Values

  • LED:

    • Liberty
    • Equality
    • Democracy
  • Patriot Act (2001)

import java.util.ArrayList;
public class BaseConversion {
public static void main(String...z) {
if (z.length !=2) {
System.out.printf("Usage: java BaseConversion <integer> <base>\n");
System.exit(1);
}
ArrayList<Integer> result = new ArrayList<Integer>();
@blazindragon
blazindragon / lst.tex
Created January 21, 2014 22:44
Lst Code Formatting
% ================== Code Formatting ========================
\lstset{ %
language=Java, % the language of the code
basicstyle=\footnotesize\ttfamily, % the size of the fonts that are used for the code
numbers=left, % where to put the line-numbers
numberstyle=\tiny, % the style that is used for the line-numbers
stepnumber=1, % the step between two line-numbers. If it's 1, each line
% will be numbered
numbersep=5pt, % how far the line-numbers are from the code
@blazindragon
blazindragon / sendmail.py
Created December 4, 2013 02:05
Zip image files from directory and send to email
import os
import re
import zipfile
import smtplib
import sys
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email import Encoders