Skip to content

Instantly share code, notes, and snippets.

View mk0x9's full-sized avatar

Mikhail Kuryshev mk0x9

  • Berlin, Germany
  • 06:16 (UTC +02:00)
View GitHub Profile
<?xml version="1.0"?>
<VAST version="3.0">
<Ad>
<InLine>
<AdSystem>Test AdSystem</AdSystem>
<AdTitle>Test</AdTitle>
<Description>Hello</Description>
<Impression><![CDATA[https://localhost:3001/impression]]></Impression>
<Creatives>
<Creative>
import _set from 'lodash/fp/set';
import _get from 'lodash/fp/get';
const LOCAL_STORAGE_WORKS = (() => {
const key = '__test_local_storage__';
try {
localStorage.setItem(key, key);
localStorage.removeItem(key);
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwVACPi9w23mF3tBkdZz+
zwrzKOaaQdr01vAbU4E1pvkfj4sqDsm6lyDONS789sVoD/xCS9Y0hkkC3gtL1tSf
TlgCMOOul9lcixlEKzwKENj1Yz/s7daSan9tqw3bfUV/nqgbhGX81v/+7RFAEd+R
wFnK7a+XYl9sluzHRyVVaTTveB2GazTwEfzk2DWgkBluml8OREmvfraX3bkHZJTK
X4EQSjBbbdJ2ZXIsRrYOXfaA+xayEGB+8hdlLmAjbCVfaigxX0CDqWeR1yFL9kwd
9P0NsZRPsmoqVwMbMu7mStFai6aIhc3nSlv8kg9qv1m6XHVQY3PnEw+QQtqSIXkl
HwIDAQAB
-----END PUBLIC KEY-----
<!doctype html>
<html>
<head>
<title>test</title>
<link rel='stylesheet' href='http://localhost:8088/assets/test.css'>
</head>
<body>
<div id='container'>
<div id='inner'>
<div id='spacer-before' class='spacer'></div>
$ cat /usr/share/calendar/calendar.lotr
/*
* Lord Of The Rings
*
* $FreeBSD: src/usr.bin/calendar/calendars/calendar.lotr,v 1.2 2003/10/09 00:31:48 grog Exp $
*/
#ifndef _calendar_lotr_
#define _calendar_lotr_
require 'ffi'
class ASS_Event < FFI::Struct
layout :start, :long_long,
:duration, :long_long,
:readOrder, :int,
:layer, :int,
:style, :int,
:name, :string,
:marginL, :int,
body_click_handler = ->
(jQuery 'body').click (e) ->
switch e.target.getAttribute 'data-action'
@mk0x9
mk0x9 / icfpc2012.ls
Created August 1, 2012 22:01
ICFPC 2012 submission
time_start = process.hrtime!
String::replaceAt = (idx, c) ->
@substr(0, idx) + c + @substr(idx + c.length)
PF = require \pathfinding
fs = require \fs
read-map = ->
arr = fs.readFileSync it, \ascii |> (.split \\n)
idx = 0
$ qmake-qt4 -spec linux-g++-32 && make
/usr/lib64/qt4/bin/uic aboutdialog.ui -o ui_aboutdialog.h
/usr/lib64/qt4/bin/uic settingsdialog.ui -o ui_settingsdialog.h
g++ -c -m32 -pipe -std=c++0x -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT -fPIC -DSKYPETABNG_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++-32 -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o mainwindow.o mainwindow.cpp
g++ -c -m32 -pipe -std=c++0x -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT -fPIC -DSKYPETABNG_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++-32 -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o x11int.o x11int.cpp
g++ -c -m32 -pipe -std=c++0x -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buf
# http://stackoverflow.com/questions/9739654/rake-assetsprecompile-taking-extremely-long-to-complete
# nocompress
module Sass
module Rails
class CssCompressor
def compress(css)
css
end
end