This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Aer interface { | |
DoA() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string base64_encode(const std::string& in) { | |
BUF_MEM *bptr; | |
BIO* b64 = BIO_new(BIO_f_base64()); | |
BIO* bio = BIO_new(BIO_s_mem()); | |
bio = BIO_push(b64, bio); | |
BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL); | |
BIO_write(bio, in.c_str(), (int)in.size()); | |
BIO_flush(bio); | |
BIO_get_mem_ptr(bio, &bptr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"compress/gzip" | |
"fmt" | |
"io" | |
"math/rand" | |
"net/http" | |
"net/url" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"net" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
HOST = '127.0.0.1' | |
try: | |
s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s1.bind((HOST, 13748)) | |
s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s2.bind((HOST, 15428)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void run_process(const wchar_t* name, const wchar_t* param) { | |
SHELLEXECUTEINFOW info; | |
info.cbSize = sizeof(SHELLEXECUTEINFOW); | |
info.fMask = SEE_MASK_NOCLOSEPROCESS; | |
info.hwnd = NULL; | |
info.lpVerb = NULL; | |
info.lpFile = name; | |
info.lpParameters = param; | |
info.lpDirectory = NULL; | |
info.nShow = SW_HIDE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Copyright (c) 2009 Google Inc. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"net/http" | |
"os" | |
"strconv" | |
) | |
func handler(w http.ResponseWriter, r *http.Request) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bsm.cpp : Defines the entry point for the application. | |
// | |
#include "stdafx.h" | |
#include "bsm.h" | |
HINSTANCE hInst; | |
TCHAR szTitle[] = TEXT(""); | |
TCHAR szWindowClass[] = TEXT(" "); |