Skip to content

Instantly share code, notes, and snippets.

View CyberShadow's full-sized avatar

Vladimir Panteleev CyberShadow

View GitHub Profile
@CyberShadow
CyberShadow / .gitignore
Last active August 29, 2015 14:04
lifecompetes.com bot
*.txt
*.exe
/trace/
@CyberShadow
CyberShadow / .gitignore
Last active August 29, 2015 14:06
Golden Sun - Lucky Dice analysis
/analysis.txt
/rolls.txt
/*.png
/*.svg
/plot.gnu
*.exe
*.ilk
*.pdb
@CyberShadow
CyberShadow / steamprice.cmd
Last active August 29, 2015 14:07
Steam price fetcher
@echo off
if _%1_==__ goto :eof
set URL=%~1
if _%URL:~0,29%_==_http://store.steampowered.com_ goto urlok
goto next
:urlok
call :curl %1 store
@echo off
rem This batch file assumes that CMake is installed in C:\Cmake,
rem MinGW-32 in C:\mingw32, and MinGW-64 in C:\mingw64.
call :oneplatform 32
call :oneplatform 64
goto :eof
:oneplatform
@CyberShadow
CyberShadow / .gitignore
Last active August 29, 2015 14:23
Phobos public names diff generator
*.exe
*.pdb
*.ilk
*.txt
*.json
*.diff
// Eager version
void main(string[] args)
{
import std.algorithm, std.file, std.path, std.range, std.uni;
args[1..$].each!(fn =>
fn
.readText()
.toLower
.copy(File(fn.setExtension(".lower"), "wb").lockingTextWriter)
diff --git a/search.cpp b/search.cpp
index 27eca9f..83b837b 100644
--- a/search.cpp
+++ b/search.cpp
@@ -408,15 +408,17 @@ void* ramEnd = (char*)ram + RAM_SIZE;
#define ALL_FILE_BUFFER_SIZE 0
#endif
-struct CompressedState_packed
+struct PackedCompressedState
@CyberShadow
CyberShadow / hookexample.cpp
Created April 16, 2010 20:37
madCodeHook method hooking example
class MyObject;
int (MyObject::*origFunction)(int);
class MyObject
{
public:
int funcHandler(int param)
{
// do hooked stuff
#!/usr/bin/env python
USERNAME = "thecybershadow" # don't include @gmail.com
PASSWORD = "hunter2"
RESOURCE = "gmail.com"
import sys
if len(sys.argv) < 2:
print 'Usage: python gstatus.py <show> [<status>]'
module AddPNGChunk;
import std.file;
import Data, PNG;
void main(string[] args)
{
if (args.length != 4)
throw new Exception("Usage: AddPNGChunk Image.png ChunkID Filename.ext");