This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
void __fastcall Hotpatch(void* pOFunc, void* pHkFunc) | |
{ | |
DWORD dwOldProt = 0; | |
BYTE bPatch[5]; | |
bPatch[0] = 0xE9; | |
VirtualProtect((void*)pOFunc, 5, PAGE_EXECUTE_READWRITE, &dwOldProt); | |
DWORD dwRelativeAddr = ((DWORD)pHkFunc - (DWORD)pOFunc - 5); | |
memcpy(&bPatch[1], &dwRelativeAddr, 4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[PHP] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ipconfig /flushdns | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden | Find "0x0" | |
IF %ERRORLEVEL% == 1 goto turnoff | |
If %ERRORLEVEL% == 0 goto turnon | |
goto end | |
:turnon | |
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f | |
goto end | |
:turnoff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function virtualenv_info { | |
[[ -n "$VIRTUAL_ENV" ]] && echo '('${VIRTUAL_ENV:t}') ' | |
} | |
function ruby_prompt { | |
if (( $+commands[rvm-prompt] )); then | |
print -n $ZSH_THEME_RUBY_PROMPT_PREFIX | |
print -n $(~/.rvm/bin/rvm-prompt) | |
print -n $ZSH_THEME_RUBY_PROMPT_SUFFIX | |
elif (( $+commands[rbenv] )); then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function actionExport() | |
{ | |
//get all the rooms | |
$rooms = Room::model()->findAll(array('order'=>'orderby')); | |
foreach ($rooms as $r) { | |
$rslug = $r->slug; | |
$$rslug = <<<HTMLComposeMessage | |
<?xml version="1.0" encoding="UTF-8"?> | |
<panorama id="node1"> |