Skip to content

Instantly share code, notes, and snippets.

View Justasic's full-sized avatar
🏍️
Making computers do things they don't want to

NightShadow Justasic

🏍️
Making computers do things they don't want to
View GitHub Profile
@Justasic
Justasic / TestReadmeANT.md
Created October 7, 2012 05:36
Test Readme for ANT

Other switches

  • List of switches: -h, --help
  • Start with minimal logging: -d, --developer
  • Stay in console: -n, --nofork
  • Debug everything sent to/from every socket: -p, --protocoldebug
  • No terminal colors: -c, --nocolor
  • Show memory info: -m, --memorydebug
  • Do not write to databases: -r, --readonly
  • Print version: -v, --version
@Justasic
Justasic / growl-xcode.patch
Last active December 16, 2015 15:19
Fix Growl compile on XCode. Patch with the following command in the growl directory: patch -p1 < growl-xcode.patch
--- growl.new/Plugins/Actions/SMS/GrowlSMSDisplay.m 2013-04-24 12:50:06.000000000 -0700
+++ growl/Plugins/Actions/SMS/GrowlSMSDisplay.m 2013-04-24 12:38:47.000000000 -0700
@@ -138,7 +138,7 @@
CFDataRef postData = CFStringCreateExternalRepresentation(kCFAllocatorDefault, dataString, kCFStringEncodingUTF8, 0U);
CFURLRef clickatellURL = CFURLCreateWithString(kCFAllocatorDefault, CFSTR("https://api.clickatell.com/xml/xml"), NULL);
NSMutableURLRequest *post = [[NSMutableURLRequest alloc] initWithURL:(NSURL *)clickatellURL];
- CFStringRef contentLength = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%u"), CFDataGetLength(postData));
+ CFStringRef contentLength = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%lu"), CFDataGetLength(postData));
// NSLog(@"SMS display: Sending data: %@", postData);

Original game with many source code fixes, bug fixes, x86_64 support, SDL support, and more.

Return to Castle Wolfenstein single player GPL source release

This file contains the following sections:

  • GENERAL NOTES
  • LICENSE
@Justasic
Justasic / vmware_procfs.patch
Created May 26, 2013 07:01
VMWare 9.0.2 patch for linux kernel 3.10.0-rc1 and 3.10.0-rc2
--- a/bridge.c
+++ b/bridge.c
@@ -105,8 +105,6 @@ static Bool VNetBridgeCycleDetect(VNetJack *this, int generation);
static Bool VNetBridgeIsDeviceWireless(struct net_device *dev);
static void VNetBridgePortsChanged(VNetJack *this);
static int VNetBridgeIsBridged(VNetJack *this);
-static int VNetBridgeProcRead(char *page, char **start, off_t off,
- int count, int *eof, void *data);
static void VNetBridgeComputeHeaderPosIPv6(struct sk_buff *skb);
static PacketStatus VNetCallSMACFunc(struct SMACState *state,
@Justasic
Justasic / test.cpp
Created June 4, 2013 19:54
Use C++11 features to implement a function queue which calls functions later but queues them up in a FIFO queue. Compile with: clang -std=c++11 -stdlib=libc++
#include <iostream>
#include <functional>
#include <queue>
// These includes are for later experimentation
#include <thread>
#include <atomic>
std::queue<std::function<void()>> funcs;
@Justasic
Justasic / allocateTest.cpp
Last active December 18, 2015 09:28
This shows how you can use pointer arithmetic to store the size of the allocated memory block in the pointer itself and use it to store how much memory is allocated. This does not include new[] or delete[] as well as malloc, calloc, realloc, free re-definitions (therefore the STL may allocate and use untracked memory)
#include <new>
#include <stdint.h>
#include <stdlib.h>
#include <cstdio>
#if 1
// Define these as old ones
#define _new new
#define _delete delete
#undef new
@Justasic
Justasic / PointerHacking.cpp
Created June 18, 2013 03:11
I used this to teach @lordofsraam how pointers work and how you can use them to store more than one value in memory (which is what every C string does but this is slightly different)
#include <new>
#include <cstring>
#include <stdlib.h>
#include <iostream>
#include <cstdio>
#include <malloc.h>
int main(int argc, char **argv)
{
size_t *ptr = (size_t*) malloc(11);//malloc(3 + sizeof(size_t));
@Justasic
Justasic / poker.patch
Created October 19, 2013 02:12
This is a patch for the facebook autopoker script at https://github.com/linuz/Facebook-Auto-Poker
--- FacebookAuto-Poker.py 2013-10-18 19:11:04.978590959 -0700
+++ FacebookAuto-Poker.py.old 2013-10-18 19:10:31.538591522 -0700
@@ -7,8 +7,8 @@
#############################################################################
FACEBOOK_USERNAME = ""
FACEBOOK_PASSWORD = ""
-import mechanize, time, os
-MAX_DELAY = 60
+import mechanize, time, os, sys
+MAX_DELAY = 25
@Justasic
Justasic / xchat_googlevoice.py
Created December 21, 2013 05:56
This is an XChat/HexChat plugin to announce Google Voice SMS notifications locally on your IRC client. If you're like me and always looking at your IRC client not your phone, this is much more useful.
__module_name__ = "Google Voice"
__module_version__ = "1.0"
__module_description__ = "Receive Google Voice SMS notifications in IRC"
# This google voice plugin ONLY receives SMS messages and displays them in
# the current context. You are NOT able to reply to these people through
# this plugin (YET).
#
# This plugin requires the pygooglevoice library, unfortunately, it hasn't
# been updated in a few years and has since changed. You can view an updated
@Justasic
Justasic / FacebookAuto-Birthday-Wisher.py
Created January 1, 2014 06:01
This is my (very buggy) facebook automatic birthday wisher
#! /usr/bin/python
#############################################################################
# Facebook Auto-Birthday-Wisher Python V1.5 #
# #
# Written By: Justin Crawford <[email protected]> #
# Auto-wishes everyone's birthdays daily and counts them. #
#############################################################################
FACEBOOK_USERNAME = ""
FACEBOOK_PASSWORD = ""
import mechanize, time, os, sys, curses, re