All of the following information is based on go version go1.17.1 darwin/amd64
.
GOOS | Out of the Box |
---|---|
aix |
✅ |
android |
✅ |
package main | |
import ( | |
"fmt" | |
"github.com/gorilla/mux" | |
"github.com/gorilla/securecookie" | |
"net/http" | |
) | |
// cookie handling |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
BOOL WINAPI DllMain(HINSTANCE module_handle, DWORD reason_for_call, LPVOID reserved) | |
{ | |
if (reason_for_call == DLL_PROCESS_ATTACH) // Self-explanatory | |
{ | |
DisableThreadLibraryCalls(module_handle); // Disable DllMain calls for DLL_THREAD_* | |
if (reserved == NULL) // Dynamic load | |
{ | |
foobar_meow(); // Initialize your stuff or whatever | |
// Return FALSE if you don't want your module to be dynamically loaded | |
} |
/* | |
***************************************************************************** | |
* The C++ Integer To String Conversion Benchmark * | |
* * | |
* This benchmark is based on the solutions provided in the following * | |
* stackoverflow question: * | |
* * | |
* http://stackoverflow.com/q/4351371 (Date: 20101204) * | |
* * | |
* Title: C++ Performance Challenge - Integer To std::string Conversion * |
The following Lua program generates a Lua bytecode program called ignore-unsigned-sga.fnt
, which in turn loads a DLL from within an extremely locked down Lua 5.1 sandbox in a program called RelicCOH2.exe. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.
if string.dump(function()end):sub(1, 12) ~= "\27Lua\81\0\1\4\4\4\8\0" then
error("This generator requires a 32-bit version of Lua 5.1")
end
local function outer()
local magic -- In bytecode, the stack slot corresponding to this local is changed
#!/usr/bin/ruby | |
docPath = "wwdc_srts" | |
#exclude . and .. folder | |
folders = Dir.entries(docPath).select{|folder| folder.to_i > 0} | |
folders.each{ |folder| | |
print folder | |
print "\n" | |
sequenceFilePath = docPath + "/" + folder |
import requests | |
import os, re, sys | |
RE_SD_VIDEO = re.compile( | |
r'<a href="(http://devstreaming.apple.com/videos/wwdc/2013/[^"]*-SD.mov)') | |
RE_WEBVTT = re.compile(r'fileSequence[0-9]+\.webvtt') | |
# stdin: dump of https://developer.apple.com/wwdc/videos/ | |
for l in sys.stdin: | |
m = RE_SD_VIDEO.search(l) |
import requests | |
import os, re, sys | |
RE_SD_VIDEO = re.compile( | |
r'<a href="(http://devstreaming.apple.com/videos/wwdc/2013/[^"]*-SD.mov)') | |
RE_WEBVTT = re.compile(r'fileSequence[0-9]+\.webvtt') | |
# stdin: dump of https://developer.apple.com/wwdc/videos/ | |
for l in sys.stdin: | |
m = RE_SD_VIDEO.search(l) |