Skip to content

Instantly share code, notes, and snippets.

@ktimothy
ktimothy / .gitconfig
Last active March 13, 2020 17:05
git config
[alias]
h = log --pretty=format:\"%h \\\"%s\\\" by %an %ci (%ai)\" -10 --graph
s = status
a = log -g --pretty=format:\"%h %cd %ad \\\"%s\\\" by %an (%cn)\" --all
p = pull --rebase
pff = push --force
[user]
name = Tim Kovalev
email = timothy.kovalev@gmail.com
[core]
@ktimothy
ktimothy / OverloadTest.as
Created January 16, 2013 14:51
перегрузка в AS
package
{
import flash.display.Sprite;
/**
*
*
* @author timothy.kovalev
*/
@ktimothy
ktimothy / gist:6459878
Created September 6, 2013 05:28
show git branch in bash prompt
export PS1='\u@\h: \W$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d "\n" | sed s/^/\ \(/ | sed s/$/\)/ )\$ '
@ktimothy
ktimothy / TestMasterString.as
Created November 6, 2013 14:02
as master strings
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.sampler.getMasterString;
/**
*
# save bash history separately for every open terminal
export MYTTY=`tty`
export HISTFILE=$HOME/.bash_history.d/.bash_history_`basename $MYTTY`
export HISTFILESIZE=2000
@ktimothy
ktimothy / memcached.plist
Created June 1, 2014 09:17
Running memcached, mysql, postgresql as services on Mac OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>memcached</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/memcached</string>
</array>
# Set the type of synced folders, depending on host os.
# Default VirtualBox folders cause symbolic links and unix socket bugs.
# So for Mac and Linux hosts we use NFS. Windows does not support it.
# So Windows host use rsync. Note that you should run vagrant rsync-auto.
synced_folder_type = FFI::Platform::IS_WINDOWS ? :rsync : :nfs
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
<iframe src="//banners.socialquantum.com/assets/iframe/toolbar.html?game_code=farm&platform=od" width="760" height="60" style="border: 0;" hspace="0" vspace="0" scrolling="no" border="no" marginwidth="0" marginheight="0"></iframe>
<iframe src="//banners.socialquantum.com/assets/iframe/rotator.html?game_code=farm&platform=od" width="760" height="90" style="border: 0;" hspace="0" vspace="0" scrolling="no" border="no" marginwidth="0" marginheight="0"></iframe>
@ktimothy
ktimothy / wtf.html
Created October 1, 2015 19:12
what's wrong with browsers?
<!doctype html>
<html>
<head>
<title>Test</title>
</head>
<body>
<script type="text/javascript">
var tag = "<script></script>";
</script>
</body>

Интеграция нового баннера

Новый баннер использует html5, и поэтому работает внутри iframe. Теперь вместо вставки swf нужно вставлять именно iframe.

Есть 2 баннера: верхний баннер (тулбар) и нижний (ротатор). Код их вставки одинаковый для всех игр, отличаются только параметры url.

Код для вставки

Код вставки тулбара: