Skip to content

Instantly share code, notes, and snippets.

View ducphanduyagentp's full-sized avatar
😸
writing happy exploits

Duc Phan ducphanduyagentp

😸
writing happy exploits
View GitHub Profile
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@ducphanduyagentp
ducphanduyagentp / tweet_dumper.py
Created December 19, 2016 04:40 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
#include <bits/stdc++.h>
#define f0(i,n) for(__typeof(n) i=0;i<n;i++)
#define rep(i,a,b) for(__typeof(b) i=a;i<=b;i++)
#define read(s) freopen(s , "r" ,stdin)
#define write(s) freopen(s , "w" , stdout)
#define BUG(x) cerr << #x << " = " << x << '\n'
using namespace std;
const string pattern = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
#include <bits/stdc++.h>
#define f0(i,n) for(__typeof(n) i=0;i<n;i++)
#define rep(i,a,b) for(__typeof(b) i=a;i<=b;i++)
#define read(s) freopen(s , "r" ,stdin)
#define write(s) freopen(s , "w" , stdout)
using namespace std;
struct BIT{
#include <bits/stdc++.h>
#define f0(i,n) for(__typeof(n) i=0;i<n;i++)
#define rep(i,a,b) for(__typeof(b) i=a;i<=b;i++)
#define read(s) freopen(s , "r" ,stdin)
#define write(s) freopen(s , "w" , stdout)
#define BUG(x) cerr << #x << " = " << x << '\n'
using namespace std;
const int MAXN = 1003;
typedef long long ll;
[
{
"args":
{
"file": "Packages/User/template.sublime-macro"
},
"command": "run_macro_file"
},
{
"args":
{
"shell":true,
"cmd":["g++ -std=c++11 $file_name -o $file_base_name"]
}
{
"path": "C:\\MinGW\\bin\\",
"working_dir": "${file_path}",
"cmd": ["g++", "-c", "${file}", "-o", "${file_path}/${file_base_name}.o"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.c, source.c++, source.cpp",
"variants":
[
{