Skip to content

Instantly share code, notes, and snippets.

@fabre-thibaud
fabre-thibaud / Set up Debian on MIPS architecture.md
Created August 14, 2015 20:46
Instructions to setup a MIPS emulated VM

Debian / MIPS on QEMU

Based on https://gmplib.org/~tege/qemu.html and http://www.aurel32.net/info/debian_mips_qemu.php

Install QEMU and fetch Debian Jessie installer

sudo apt-get install qemu
wget http://ftp.debian.org/debian/dists/jessie/main/installer-mips/current/images/malta/netboot/initrd.gz
wget http://ftp.debian.org/debian/dists/jessie/main/installer-mips/current/images/malta/netboot/vmlinux-3.16.0-4-4kc-malta
#!/usr/bin/python
#
# This script will provides a reverse-search on Packagist to find which libraries uses a given library package
# as a dependency.
#
# Usage:
# First, you need to fetch dependencies: ./packagist.py --fetch
# After, you can start checking packages: ./packagist.py --package <package-name>
#
# Author: Vincent Composieux <vincent.composieux@gmail.com>
# Example with basic types
---
hash:
  string: some text
  number: 12345
  array_of_bool: [on, off, true, false, yes, no]
  ruby symbol: :symbol
  array:
    - item one
    - item two
@fabre-thibaud
fabre-thibaud / gist:bd707b1037f19cfc5b59
Created December 17, 2014 14:55
Opcodes for EC point multiplication
==================================================================================================================================================
Opcodes for point multiplication via Montgomery Ladder without branching
// Significant lines are l. 185 - 197 - content of loop, previous branches are irrelevant (at least I think they are))
==================================================================================================================================================
Function mul:
Finding entry points
Branch analysis from position: 0
@fabre-thibaud
fabre-thibaud / test-case.php
Last active August 29, 2015 14:05
HHVM \ReflectionFunction::getStaticVariables() incompatibility with PHP 5.4 -> 5.6
<?php
//See https://travis-ci.org/aztech-digital/closure-scope-merger/builds/33884775 for output containing test case
class ReflectionTest extends \PHPUnit_Framework_TestCase
{
public function testReflectionFunctionRefVars()
{
$refVariable = false;
$refName = 'refVariable';
<?php
interface FooInterface
{
function foo($param);
}
class Foo implements FooInterface
{
public function foo($param)