Skip to content

Instantly share code, notes, and snippets.

View reflog's full-sized avatar

Eli Yukelzon reflog

View GitHub Profile
@reflog
reflog / conf.js
Created May 7, 2018 08:28
next js with typescript via babel
{
"presets": ["@babel/preset-typescript", "next/babel"],
}
/* tslint:disable */
const withCss = require("@zeit/next-css");
const withSass = require("@zeit/next-sass");
const withTypescript = require("@zeit/next-typescript");
const withSourceMaps = require("@zeit/next-source-maps");

Keybase proof

I hereby claim:

  • I am reflog on github.
  • I am reflog (https://keybase.io/reflog) on keybase.
  • I have a public key whose fingerprint is A49F 52F6 1BFF AE5D 9625 1E92 39EB 7E22 3BD7 F040

To claim this, I am signing this object:

sync2
@reflog
reflog / etching.cpp
Created May 28, 2012 07:52
etching
QPalette pal = QApplication::palette();
pal.setColor(QPalette::Disabled, QPalette::Text, QColor(80, 80, 80));
pal.setColor(QPalette::Disabled, QPalette::Light, QColor(0, 0, 0, 0));
QApplication::setPalette(pal);
import re, urllib2,sys
k = 0
for i in range(7,0,-1):
page_url = "http://theoatmeal.com/comics_pg/page:%d"%i
out = open("oatmeal\\out%d.html"%i,"w")
out.write("<html><body>\n")
print "getting " + page_url
f = urllib2.urlopen(page_url)
a = f.read()
results = []
@reflog
reflog / qrc scons support.py
Created January 3, 2012 13:40
qrc scons support
#adding qrc resources compilation
import xml.dom.minidom
qtResourceFile = []
for q in ("GUI.qrc", "UI/UI.qrc",):
baseq = os.path.basename(q)[:-4]
qrcdeps = []
qrc = programEnv['ENV']['PWD'] + "/GUI/" + q
dir = os.path.dirname(qrc)
x = xml.dom.minidom.parse(open(qrc))
@reflog
reflog / xkcd.py
Created October 31, 2011 09:25
A small script to store XKCD comics in PDF format
import sys, urllib2,json
Base = 'http://xkcd.com/'
Tail = 'info.0.json'
def main():
n = int(sys.argv[1])
k = int(sys.argv[2])
out = open("out3.html","w")
out.write("<html><body>\n")
@reflog
reflog / trace.m
Created May 26, 2011 13:41
template for tracking allocations
#define SYNTESIZE_TRACE(X) \
@interface Trace##X : X { \
} \
@end \
\
@implementation Trace##X\
\
- (id)retain {\
NSUInteger oldRetainCount = [super retainCount];\
id result = [super retain];\
#ifndef Q_OS_MAC
setWindowIcon( QIcon(":/windowIcon") );
#else
myAction->setMenuRole(QAction::ApplicationSpecificRole);
#endif
void setupWindowWithoutStatusBar(QWidget* w){
NSView* view = (NSView*) w->winId();
NSWindow* win = [view window ];
[win setShowsResizeIndicator:FALSE];
NSUInteger mask = [win styleMask];
[win setStyleMask:mask | ~NSResizableWindowMask];
}