Skip to content

Instantly share code, notes, and snippets.

View moonpolysoft's full-sized avatar

Cliff Moon moonpolysoft

View GitHub Profile
ev.size = size; /* total size */
ev.iov = ivp;
ev.binv = bvp;
fpe_was_unmasked = erts_block_fpe();
(*drv->outputv)((ErlDrvData)p->drv_data, &ev);
erts_unblock_fpe(fpe_was_unmasked);
if (ivp != iv) {
erts_free(ERTS_ALC_T_TMP, (void *) ivp);
}
if (bvp != bv) {
/*
** Everything ok, patch the beam code with op_call_nif
*/
mod->nif = lib;
for (i=0; i < entry->num_of_funcs; i++)
{
Uint* code_ptr;
erts_atom_get(entry->funcs[i].name, sys_strlen(entry->funcs[i].name), &f_atom);
code_ptr = *get_func_pp(mod->code, f_atom, entry->funcs[i].arity);
Package: webmachine
Architecture: all
Depends: erlang-otp
Section: misc
Priority: extra
Description: webmachine
webmusheen is a transcription of justin sheehy's brain into erlang. ponytail optional.
split_binary(Bin, Char) ->
split_binary(Bin, Char, 0, []).
split_binary(Bin, _, Pos, Acc) when Pos >= byte_size(Bin) ->
lists:reverse([Bin|Acc]);
split_binary(<<Char:8, Rest/binary>>, Char, Pos, Acc) ->
split_binary(Rest, Char, 0, [<<>> | Acc]);
split_binary(Bin, Char, Pos, Acc) ->
abstract class CCTherm {
val description: String
val yearMade: Int
def toXML =
<cctherm>
<description>{description}</description>
<yearMade>{yearMade}</yearMade>
</cctherm>
static char blank[] = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00,
0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x02,
0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xDE, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42,
0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00,
0x0B, 0x13, 0x00, 0x00, 0x0B, 0x13, 0x01, 0x00, 0x9A, 0x9C, 0x18, 0x00, 0x00, 0x00, 0x07,
0x74, 0x49, 0x4D, 0x45, 0x07, 0xD9, 0x05, 0x0D, 0x10, 0x39, 0x1E, 0x2B, 0xC2, 0xA3, 0x43,
0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6F, 0x6D, 0x6D, 0x65, 0x6E, 0x74,
0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47,
0x49, 0x4D, 0x50, 0x57, 0x81, 0x0E, 0x17, 0x00, 0x00, 0x00, 0x0C, 0x49, 0x44, 0x41, 0x54,
0x08, 0xD7, 0x63, 0xF8, 0xFF, 0xFF, 0x3F, 0x00, 0x05, 0xFE, 0x02, 0xFE, 0xDC, 0xCC, 0x59,
if (MagickFalse == MagickResizeImage(magick->wand,resize_width,resize_height,LanczosFilter,1.0)) {
send_error(magick->wand, magick->port);
return;
}
pixel = NewPixelWand();
PixelSetRed(pixel, red);
PixelSetGreen(pixel, green);
PixelSetBlue(pixel, blue);
PixelSetOpacity(pixel, opacity);
val name = "fuck"
val balls = "balls"
balls match {
case name => "fuck you"
case _ => true
}
def __byteConversion(v : Long) : Array[Byte] = {
val ba = new Array[Byte](8)
ba(0) = (0xff & (v >> 56)).toByte
ba(1) = (0xff & (v >> 48)).toByte
ba(2) = (0xff & (v >> 40)).toByte
ba(3) = (0xff & (v >> 32)).toByte
ba(4) = (0xff & (v >> 24)).toByte
ba(5) = (0xff & (v >> 16)).toByte
ba(6) = (0xff & (v >> 8)).toByte
ba(7) = (0xff & v).toByte
8===================D~~~~~~ ( ¡ )