Skip to content

Instantly share code, notes, and snippets.

@QROkes
QROkes / qa-plugin.php
Last active February 23, 2021 10:30
Anti SPAM Registration Plugin for Question2Answer - StopForumSpam API
<?php
/*
File: qa-plugin/webinoly-custom/qa-plugin.php
Description: Anti SPAM Registration Plugin for Question2Answer
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
// Put this file in Program Files\Adobe\Photoshop\Presets\Scripts\
// In PhotoShop menu File > Scripts > Layers To Sprite Sheet
// Arrange layers into a sprite sheet.
if (documents.length > 0) {
var docRef = activeDocument;
var numLayers = docRef.artLayers.length;
var cols = docRef.width;
@drewchapin
drewchapin / Template.nsi
Created February 20, 2018 19:09
Template for modern NSIS installation script
;-------------------------------------------------------------------------------
; Includes
!include "MUI2.nsh"
!include "LogicLib.nsh"
!include "WinVer.nsh"
!include "x64.nsh"
;-------------------------------------------------------------------------------
; Constants
!define PRODUCT_NAME "My Application"
@AhnMo
AhnMo / http_client_get.cc
Last active September 17, 2024 17:14
Wininet HTTP Client Example
#include <windows.h>
#include <wininet.h>
#include <stdio.h>
#pragma comment (lib, "Wininet.lib")
int main(int argc, char *argv[]) {
HINTERNET hSession = InternetOpen(
L"Mozilla/5.0", // User-Agent
@whoshuu
whoshuu / curlget.cpp
Created March 31, 2015 06:44
Example libcurl GET request
#include <curl/curl.h>
#include <string>
size_t writeFunction(void *ptr, size_t size, size_t nmemb, std::string* data) {
data->append((char*) ptr, size * nmemb);
return size * nmemb;
}
int main(int argc, char** argv) {
auto curl = curl_easy_init();
@grawity
grawity / Makefile
Created January 11, 2012 21:33
NTFS volume creation timestamp
CC = i486-mingw32-gcc
LDFLAGS = -lntoskrnl -lntdll
volumeinfo.exe: volumeinfo.c
$(CC) -o $@ $< $(LDFLAGS)