Skip to content

Instantly share code, notes, and snippets.

@CoolOppo
CoolOppo / autoexec.cfg
Last active August 29, 2015 13:56
My autoexec.cfg
// Launch Options:
// -novid -tickrate 128 -high -threads 6
con_enable "1" // Enable the console
bind "KP_MINUS" "toggleconsole" // dash key on numpad, opens console
bind "O" "toggle voice_enable 1 0" // enables and disables voice communication when pressing O
bind "ALT" "+voicerecord" // key to use ingame voice, in this case V
bind "SEMICOLON" "ignorerad" // Will ignore ALL radio commands (Fire in the hole, need backup, etc.) This command works like a toggle, press key again to enable radio commands again
bind "F10" "quit"
bind z "use decoy" // Quit game instantly when pressing F10 without clicking OK in a popup
bind x "use incgrenade;use molotov"
@CoolOppo
CoolOppo / SUM-PROD
Created February 26, 2014 22:45
A program I made in TI-BASIC to find two numbers that have a specified sum and product.
ClrHome
Disp "ENTER PRODUCT","AND SUM"
Prompt P,S
0->O
.5S->I
If (S<0 xor P<0)
Then
While (SO!=P)
S+1->S
O-1->O
@CoolOppo
CoolOppo / entityLoop.cpp
Created March 14, 2014 01:48
Loop through entities in source engine.
/*
By Nomster
http://www.unknowncheats.me/forum/781373-post1.html
*/
CEntityList* gpMainEntityList = ( CEntityList* )( dwGameClient + 0x22321C0 );
for( int i = 0; i < MAX_ENTITY_NUM; i++ )
{
if( gpEntityList[ i ] )
{
@CoolOppo
CoolOppo / Chromium Directwrite Font Rendering.md
Last active August 29, 2015 13:58
Google Chrome Directwrite Text Antialiasing Comparison

Chromium DirectWrite Font Rendering

Recently, Chromium (the open-source project behind Google Chrome) developers have made it possible to use DirectWrite for font rendering, leading to much better and clearer fonts for Windows users! The clarity matches that of OS X and Chrome OS, both of which having absolutely gorgeous font rendering. I recently switched to Firefox specifically to avoid the horrible text aliasing in Chrome, but it would appear that as of this week, DirectWrite font rendering is actually working from within the Chrome sandbox now! This was not previously possible with the Directwrite flag, which was only added recently anyways. Chrome now uses DirectWrite for font rendering on Windows by default, and has done so from version 37 and up.

Browser comparison

*Note: These are both using different fonts, so it's pretty much an invalid comparison

@CoolOppo
CoolOppo / Auto-Strafe.au3
Last active August 29, 2015 13:58
Strafe script to automatically press 'a' when you turn left and 'd' when you turn right in FPS games (useful for 'bunny hopping' and 'strafe jumping' in games like CS:S and Quake)
#include <Misc.au3>
For $i = 0 to 1 Step 0
Switch MouseGetPos(0)
Case 0 to 959
Send("{d up}")
Send("{a down}")
Case 961 to 1920
Send("{a up}")
Send("{d down}")
@CoolOppo
CoolOppo / 0_reuse_code.js
Last active August 29, 2015 13:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
CoordMode, Caret, Screen
Run, C:\Program Files\TeamSpeak 3 Client\ts3client_win64.exe
Sleep 1000
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, lobbyUnselected.png
if ErrorLevel = 2
MsgBox Could not conduct the search.
else if ErrorLevel = 1
MsgBox Icon could not be found on the screen.
@CoolOppo
CoolOppo / Linker Enhancements in VS 2013 Update 2.md
Last active August 29, 2015 14:00
Linker Enhancements in Visual Studio 2013 Update 2

Source

Linker Enhancements in Visual Studio 2013 Update 2

For developer scenarios, linking takes the lion's share of the application's build time. From our investigation we know that the Visual C++ linker spends a large fraction of its time in preparing, merging and finally writing out debug information. This is especially true for non-Whole Program Optimization scenarios.

In Visual Studio 2013 Update 2 CTP2, a set of features were added which help improve link time significantly as measured by products we build here in our labs (AAA Games and Open source projects such as Chromium):

  • Remove unreferenced data and functions (/Zc:inline). This can help all of your projects.
  • Reduce time spent generating PDB files. This applies mostly to binaries with medium to large amounts of debug information.
  • Parallelize code-generation and optimization build phase (*