This file contains hidden or 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
/* dumper.c: An rudimental memory dumper for hunting some executable ELF images targetting Linux 2.4 and later on x86, for my own learning project. | |
* Copyright (C) 2014 Takahiro Yoshimura <[email protected]> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or 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
/** | |
* ThrowableCursorLoader: CursorLoader for CPs that tend to throw. | |
* | |
* Copyright 2014 Takahiro Yoshimura | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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
package com.gmail.altakey.count; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.ListView; | |
import android.widget.TextView; |
This file contains hidden or 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
// Patch in | |
task launchDebug(dependsOn: 'installDebug') << { | |
final String cmdline = "bash ${projectDir}/../gradle/start-intent.sh android.intent.action.MAIN ${project.tasks.generateDebugBuildConfig.appPackageName} .activity.MainActivity" | |
final Process p = cmdline.execute() | |
p.in.eachLine { l -> println l } | |
final int code = p.waitFor() | |
if (code != 0) { | |
throw new RuntimeException("Task exited with code " + code + ": " + cmdline) | |
} | |
} |
This file contains hidden or 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
Moved to https://github.com/taky/jane |
This file contains hidden or 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"?> | |
<!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>com.google.code.dbskkd-cdb</string> | |
<key>UserName</key> | |
<string>nobody</string> | |
<key>GroupName</key> | |
<string>nobody</string> |
This file contains hidden or 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
# Experimental solver for that challenge | |
import sys | |
import re | |
import itertools | |
numbers = [1,1,5,8] | |
operators = ['+', '-', '*', '//'] | |
class InversePolandEquationSolver(object): | |
def __init__(self, eq): |
This file contains hidden or 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
/* compile with: gcc -shared -fPIC -o hook.so hook.c -ldl */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <regex.h> | |
#include <dlfcn.h> | |
#include <memory.h> | |
static void *libc = NULL; |
This file contains hidden or 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
#!/usr/bin/env python | |
import math | |
class BinaryOracle(object): | |
def __init__(self, min_, max_, is_int): | |
self.min_ = min_ | |
self.max_ = max_ | |
self.is_int = is_int | |
def get(self): |
This file contains hidden or 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
import itertools | |
everybody = ['akira', 'shinya', 'hiroshi', 'chiaki', 'saki', 'yuri', 'mika', 'reina'] | |
akira, shinya, hiroshi, chiaki, saki, yuri, mika, reina = everybody | |
def conds(p): | |
return ( | |
# no self cites | |
p[0] not in (shinya, reina, hiroshi, yuri) | |
and p[1] not in (mika, chiaki) |