This file contains 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 | |
$filename = $_GET['file']; | |
$downloadRate = isset($_GET['speed']) ? intval($_GET['speed']) : 500; | |
if (file_exists($filename) && is_file($filename)) | |
{ | |
header('Cache-control: private'); | |
header('Content-Type: application/x-shockwave-flash'); // Set MIME | |
header('Content-Length: '.filesize($filename)); |
This file contains 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
<?xml version="1.0"?> | |
<project name="OperaExtensionBuild" default="build-opera-extension" basedir="."> | |
<!-- Vars --> | |
<property name="main-url" value="EXT-PAGE-URL"></property> | |
<property name="release-base-url" value="UPDATE-BASE-URL"></property> | |
<property name="config-file" value="config.xml"/> | |
<property name="src-dir" value="src"/> | |
<property name="release-dir" value="release"/> | |
<property name="temp-dir" value="temp"/> |
This file contains 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
REM run as admin, picture must be JPEG, picture size must be not more than 256KB | |
REM SET img_path=%1 or SET img_path="path to jpg" or | |
SET img_path=%~dp0background.jpg | |
SET bg_path=%SystemRoot%\system32\oobe\info\backgrounds | |
MD %bg_path% | |
COPY %img_path% %bg_path%\BackgroundDefault.jpg | |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background" /v OEMBackground /t REG_DWORD /d 1 /f | |
REM Shadow of controls: 0 - transparent shadow, 1 - shadow, 2 - no shadow | |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v ButtonSet /t REG_DWORD /d 1 /f |
This file contains 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 () { | |
// From http://www.webtoolkit.info/javascript-base64.html | |
var Base64 = { | |
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
encode : function (input) { | |
var output = ""; | |
var chr1, chr2, chr3, enc1, enc2, enc3, enc4; |
This file contains 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
int floor(float a) | |
{ | |
int b = (int)a; | |
if (a >= 0 || (a - b) == 0) | |
return b; | |
else | |
return b - 1; | |
} | |
int trunc(float r) |
This file contains 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
template <class T, class CharType>class Parser | |
{ | |
Parser(T &t) :: m_curr(t.begin()) , m_end(t.end()) {} | |
bool next_char(CharType *c) { | |
bool not_eof = m_curr != m_end; | |
if (not_eof) { | |
*c = *m_curr; | |
m_curr++; | |
} |
This file contains 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
See http://sourceforge.net/projects/astyle/ | |
Notepade++ | |
Script for NppExec: | |
NPP_SAVE | |
cd $(CURRENT_DIRECTORY) | |
с:\apps\dev\AStyle\AStyle.exe -A1 -s4 -S -w -Y -m0 -M120 -p -H -U -k3 -W3 -xj -c -xy -Z -z1 "$(FILE_NAME)" | |
Visual Studio |
This file contains 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
Script for NppExec: | |
NPP_SAVE | |
cd $(CURRENT_DIRECTORY) | |
java -jar f:\apps\dev\GoogleClosureCompiler\compiler.jar --js "$(FILE_NAME)" --js_output_file "$(NAME_PART)_min$(EXT_PART)" |
This file contains 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 <windows.h> | |
static TCHAR szWindowClass[] = TEXT("MinAppWindowClass"); | |
static TCHAR szTitle[] = TEXT("Min App"); | |
HINSTANCE hInst; | |
HWND hWnd; | |
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | |
{ |
This file contains 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 | |
function prepareForDOM($html, $inCharset) { | |
if ($inCharset != 'utf8' && $inCharset != 'utf-8') | |
$html = iconv($inCharset, 'UTF-8//TRANSLIT', $html); | |
$html = preg_replace('/<(script|style|noscript)\b[^>]*>.*?<\/\1\b[^>]*>/is', '', $html); | |
$tidy = new tidy; | |
$config = array( // See http://tidy.sourceforge.net/docs/quickref.html | |
'drop-font-tags' => true, | |
'drop-proprietary-attributes' => true, | |
'hide-comments' => true, |
OlderNewer