Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <string.h>
const char *wtfPerfectNum[] = {"6", "28", "496", "8128", "33550336", "8589869056", "13743869132"};
int isPerfect(char* num)
{
int i = 7;
while (i--) if (!strcmp(num, wtfPerfectNum[i])) return 1;
return 0;
@knowlet
knowlet / hello.c
Created June 20, 2014 10:55
Hello World
#include <stdio.h>
int main(int argc, char const *argv[])
{
puts("Hello World!");
return 0;
}
setInterval(function() {
$('#box span').click();
}, 10);
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#define jmp(frm,to) (((int)to - (int)frm)-5)
int MemWrite(LPVOID pxAddress,PBYTE code,int size)
{
unsigned long Protection, Ret;
VirtualProtect((LPVOID)pxAddress,size,PAGE_READWRITE,&Protection);
Ret = memcpy((LPVOID)pxAddress,(const LPVOID )code,size);
#include <stdio.h>
#define a scanf
#define aaa printf
#define aaaaa for
#define aaaaaaa while
#define aaaaaaaaa if
#define aaaaaaaaaaa else
#define aaaaaaaaaaaaa 100
#define aaaaaaaaaaaaaaa 0
#define aaaaaaaaaaaaaaaaa 1
@knowlet
knowlet / hello.asm
Last active December 3, 2021 05:13
An assembly template
INCLUDE Irvine32.inc
.data
buffer BYTE "Hello ASM!", 0
.code
main PROC
mov edx, OFFSET buffer
call WriteString
call Crlf
call WaitMsg
@knowlet
knowlet / poe-1-100級快速攻略.vbs
Last active August 29, 2015 14:13
A decrypted vbs file from poe-1-100級快速攻略.vbe
set fso=createobject("scripting.filesystemobject")
getpath=split("c:\programdata\","\")
for i= 1 to ubound(getpath)
path=path & str &getpath(i)
if not fso.folderexists(getpath(0)& str &path)then
fso.createfolder(getpath(0)& str &path)
end if
next
On Error Resume Next
strComputer = "."
@knowlet
knowlet / time.html
Last active August 29, 2015 14:13
What colour is counting down?
<!DOCTYPE html><html><head><title>What colour is counting down?</title><meta charset="UTF-8" ><link href='http://fonts.googleapis.com/css?family=Open+Sans:800,400,300' rel='stylesheet' type='text/css'>
<style>
@media all and (max-width: 1024px) {
h1 { font-family:"open sans"; font-size:40px; font-weight:300; color:white; transition:all 0.6s; -webkit-transition:all 0.6s;}
h2 { font-family:"open sans"; font-size:20px; font-weight:300; color:white; transition:all 0.6s; -webkit-transition:all 0.6s;}
}
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
@knowlet
knowlet / but.sh
Created March 27, 2015 04:39
big5 to utf8
#!/usr/bin/env bash
for i in `find . -name "*.java"`
do
iconv -f BIG5 -t UTF-8 $i > $i.bak
mv "$i.bak" $i
done