This file contains 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 pefile | |
import argparse | |
def decrypt_one_byte(b): | |
key = 0x58 # The xor key hasn’t changed | |
xor = (b ^ key) & 0xff | |
return (xor + key) & 0xff | |
This file contains 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
{-# LANGUAGE MagicHash, TypeOperators, MultiParamTypeClasses, TypeFamilies, DataKinds, FlexibleContexts, OverloadedStrings, ScopedTypeVariables #-} | |
import Java | |
import Data.Char | |
import Data.Dynamic | |
import Data.Typeable | |
data {-# CLASS "akka.japi.function.Function" #-} Function t r = Function (Object# (Function t r)) | |
deriving Class |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body onload=setInterval(aaa,64)> | |
<canvas id="c"></canvas> |
This file contains 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 scalanative.native._ | |
import SDL._ | |
import SDLExtra._ | |
@extern | |
@link("SDL2") | |
object SDL { | |
type Window = CStruct0 | |
type Renderer = CStruct0 |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Tea Storm unpacked</title> | |
</head> | |
<body onload=setInterval(paint,32)> | |
<canvas id=c /> |
This file contains 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
#!/bin/bash | |
# Get temp dir | |
tmpdir=$(mktemp -d) | |
# Generate test | |
cat > ${tmpdir}/ListenToSignal.java <<EOF | |
import sun.misc.Signal; | |
import sun.misc.SignalHandler; | |
public class ListenToSignal { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
trait MyOption[A] { | |
def fold[B](n: => B, s: A => B): B | |
// Define the usual Option API. | |
// | |
// * Constructors (on the object) | |
// some | |
// none | |
// * methods | |
// map |
This file contains 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 org.specs2._ | |
import scalaz._, Scalaz._ | |
class SendMoreMoneySpec extends Specification { def is = s2""" | |
Using the List Monad | |
List(1, 2) $tl1 | |
List(1, 2) if a != b $tl2 | |
List(1, 2, 3) $tl3 | |
Map('a' -> a, 'b' -> b) $tl4 | |
s.eval(List(1, 2)) $ts1 |
This file contains 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 scalaz.effect.IO | |
import scalaz.std.function._ | |
import scalaz.{Coyoneda, Free, Monad, State, ~>} | |
object NonFunctor extends App { | |
// my simple algebra | |
sealed trait Console[A] | |
case class PrintLine(msg: String) extends Console[Unit] | |
case object ReadLine extends Console[String] |
NewerOlder