Skip to content

Instantly share code, notes, and snippets.

View magmastonealex's full-sized avatar

Alex Roth magmastonealex

View GitHub Profile
diff --git a/qtdeclarative-opensource-src-5.9.3/qtdeclarative.pro b/qtdeclarative-opensource-src-5.9.3-patched/qtdeclarative.pro
index 5b94da9..b1bb628 100644
--- a/qtdeclarative.pro
+++ b/qtdeclarative.pro
@@ -1,4 +1,4 @@
-CONFIG += tests_need_tools examples_need_tools
+CONFIG += tests_need_tools examples_need_tools debug
load(qt_parts)
!python_available {
@magmastonealex
magmastonealex / keybase.md
Created August 24, 2016 23:43
Keybase proof

Keybase proof

I hereby claim:

  • I am magmastonealex on github.
  • I am magmastonealex (https://keybase.io/magmastonealex) on keybase.
  • I have a public key ASDoz56F8NS5zgJvh2CwNrF6lWlhNa2uyJ-mWzsYp_-zSwo

To claim this, I am signing this object:

@magmastonealex
magmastonealex / parse.py
Last active August 10, 2016 15:46
A small program to generate Android layout initializers from XML.
import lxml.etree as ET
import sys
defs=[]
binds=[]
for event, element in ET.iterparse(open(sys.argv[1])):
try:
elid = element.attrib["{http://schemas.android.com/apk/res/android}id"]
elid = elid.split("/")[-1]
elid_transform = elid.split(".")[-1]
@magmastonealex
magmastonealex / j2v8.md
Last active July 15, 2022 14:53
Building J2V8 for Android

You must do this on a Linux system. Mac V8 builds (at least for Android) are broken, and the build processs generates thin archives with absolute paths. So, until the J2V8 compile is done and has produced an AAR, you'll need to stay on the same machine. The AAR, however, is portable everywhere.

These directions are the result of a lot of trial-and-error, and were written for an Arch system, but there's no reason it wouldn't work on any distro.

Note that you must be careful to reconstruct your environment if you exit your shell session!

Building V8:

  • mkdir v8-builder
@magmastonealex
magmastonealex / gist:9b2169199eca6918321e
Created September 12, 2015 01:30
Windows Vista Source
/**
* (c) 2007 Misrocoft Corp.
* All rights reserved
*/
#include
class WindowsVista extends WindowsXP implements Nothing
{
@magmastonealex
magmastonealex / ffproc.py
Created September 11, 2015 03:13
Updated ffproc for non-fdk versions of ffmpeg
import shutil
import json
import os
import subprocess
import sys
#comment these two lines if you don't want to queue.
from rq import Connection, Queue
from redis import Redis
preset="slow"
<?php
if(isset($_POST["username"])){
$un=$_POST["username"];
$pw=$_POST["password"];
if(verify($un,$pw)){
echo "Correct username/password!";
}else{
echo "Incorrect username/password!";
}
}
-- Logs begin at Sun 2014-03-09 22:16:39 UTC, end at Mon 2014-03-10 17:09:51 UTC. --
Mar 10 16:57:44 localhost systemd-journal[41]: Runtime journal is using 8.0M (max allowed 162.8M, trying to leave 244.2M free of 1.5G available → current limit 162.8M).
Mar 10 16:57:44 localhost systemd-journal[41]: Runtime journal is using 8.0M (max allowed 162.8M, trying to leave 244.2M free of 1.5G available → current limit 162.8M).
Mar 10 16:57:44 localhost kernel: Initializing cgroup subsys cpuset
Mar 10 16:57:44 localhost kernel: Initializing cgroup subsys cpu
Mar 10 16:57:44 localhost kernel: Initializing cgroup subsys cpuacct
Mar 10 16:57:44 localhost kernel: Linux version 3.13.5+ (buildbot@ip-10-245-113-56) (gcc version 4.6.3 (Gentoo Hardened 4.6.3 p1.13, pie-0.5.2) ) #2 SMP Fri Mar 7 19:48:52 UTC 2014
Mar 10 16:57:44 localhost kernel: Command line: root=gptprio: init=/usr/lib/systemd/systemd console=ttyS0,115200n8 console=tty0 ro noswap cros_legacy root=gptprio: root=PARTUUID=7130c94a-213a-4e5a-8e26-6cce9662f132
Ma
from openid.store import filestore
from openid.consumer import consumer
from lib.persistDict import saveDict
import web
class openid_begin:
def GET(self):
s = {}
#web.config.db_parameters = {'dbn' : 'sqlite','db' : 'web.db'}
oidconsumer = consumer.Consumer(s, filestore.FileOpenIDStore("nonce"))
from openid.store import filestore
from openid.consumer import consumer
from lib.persistDict import getDict
from lib.login import *
import sha
import web
class openid_fin:
def GET(self):
dicti = {}