Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am alisnic on github.
  • I am andrei (https://keybase.io/andrei) on keybase.
  • I have a public key whose fingerprint is D8F0 A38C 42E0 85F2 8C0D 1435 A4FF 2FF5 3D30 870D

To claim this, I am signing this object:

@alisnic
alisnic / fail
Created June 14, 2014 08:52
Execution engine fail
ID: 218
Address: http://api.biodtlab.com/execution-engine-ws/rest/workflow/start
Encoding: ISO-8859-1
Http-Method: POST
Content-Type: application/xml
Headers: {Accept=[*/*; q=0.5, application/xml], accept-encoding=[gzip, deflate], connection=[close], Content-Length=[455], content-type=[application/xml], host=[api.biodtlab.com], user-agent=[Ruby], x-biodt-authtoken=[c7c20a0c-f281-45f9-9812-5e6889c379d7], x-forwarded-for=[192.168.0.169], x-forwarded-proto=[https], x-real-ip=[192.168.0.169]}
Payload: <?xml version="1.0"?>
<LaunchWorkflowRequest>
<user>doina</user>
<inputs>
@alisnic
alisnic / Makefile
Created October 8, 2012 07:41
Os class Makefile for lab3
all: clean floppy.img
clean:
rm -f *.o *.bin *.elf *.img
floppy.img: clean kernel.bin boot.bin
cat boot.bin kernel.bin /dev/zero | dd bs=512 count=2880 of=floppy.img
loader.o: loader.asm
nasm -f elf loader.asm -o loader.o
void longjmp(jmp_buf buf, int ret_val)
{
unsigned *esp;
/* make sure return value is not 0 */
if(ret_val == 0)
ret_val++;
/* EAX is used for return values, so store it in jmp_buf.EAX */
buf->eax = ret_val;
/* get ESP for new stack */
global setjmp
setjmp:
push ebx
mov ebx,[8 + esp]
mov [0 + ebx],edi ; buf->edi == 0(ebx) == EDI
mov [4 + ebx],esi ; buf->esi == 4(ebx) == ESI
mov [8 + ebx],ebp ; buf->ebp == 8(ebx) == EBP
@alisnic
alisnic / method_patterns.rb
Created November 28, 2012 17:05
ruby method patterns
# Usage
# class Foo
# include MethodPatterns
#
# defp :greet, check(:nil?) do |obj|
# p 'HA! NIL!'
# end
#
# defp :greet, match_any do |obj|
# p 'Hey, Object!'
@alisnic
alisnic / task.h
Created December 9, 2012 16:52
the Task data structure definition
#define TASK_STACK_SIZE 512
typedef enum {
TS_RUNNABLE = 1, TS_BLOCKED = 2, TS_ZOMBIE = 3
} task_status_t;
typedef struct {
jmp_buf state;
task_status_t status;
unsigned char stack[TASK_STACK_SIZE];
@alisnic
alisnic / ImageMagick 6.7.7-10 Homebrew Formula.md
Last active January 16, 2017 03:00 — forked from rochoa/ImageMagick 6.7.7-10 Homebrew Formula.md
Homebrew Formula for ImageMagick 6.7.7-10

Homebrew Formula patching old ImageMagick release 6.7.7-10

Install

$ brew install https://gist.githubusercontent.com/rochoa/10017167/raw/f4f09fd9f9441513d06092c881e10935735881e2/imagemagick.rb

Tested

# test.rb
module Guardian
def self.ensure_method_called!(location)
unless caller.any? {|line| line.include?(location)}
raise ArgumentError.new("nice try lol")
end
end
def self.ensure_instance_method_called!(klass, method_name)
<html>
<head>
</head>
<body>
<script type="text/javascript">
window.addEventListener("message", function(event) {
console.log(JSON.parse(event.data))
}
)
console.log("subscribed to saltedge connect notification")