Skip to content

Instantly share code, notes, and snippets.

@rdesfo
rdesfo / ghcjsdomwebkitgtk3.txt
Last active August 29, 2015 14:03
ghcjs-dom webkitgtk3
(https://pay.reddit.com/r/haskell/comments/29lapx/hplayground_write_haskell_code_for_the_browser/)
[–]hamishmack 2 points 3 days ago*
WebKitGtk includes C functions for manipulating the DOM and these are included in the webkitgtk3 Haskell package. It also supports adding callbacks to Haskell for DOM events.
To try it out just you should be able to run something like
sudo apt-get install libwebkitgtk-3.0-dev
cabal install gtk2hs-buildtools
@rdesfo
rdesfo / default.nix
Last active August 29, 2015 14:14
nix install cabal2bix default.nix file
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
{ cabal, alex, binary, dataDefault, derive, filepath, hashable
, hspec, lens, ooPrototypes, pointedlist, QuickCheck, regexBase
, regexTdfa, transformersBase, unorderedContainers
}:
cabal.mkDerivation (self: {
pname = "yi-language";
version = "0.1.1.0";

Keybase proof

I hereby claim:

  • I am rdesfo on github.
  • I am rdesfo (https://keybase.io/rdesfo) on keybase.
  • I have a public key whose fingerprint is 6F94 915E 20E7 9E5A 4CB7 290C 1B02 D3A2 90D7 E531

To claim this, I am signing this object:

@rdesfo
rdesfo / hasteCompilerShell.nix
Created June 23, 2015 23:41
haste-compiler nix-shell
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc784" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, array, base, binary, blaze-builder
, bytestring, bzlib, containers, data-binary-ieee754, data-default
, directory, either, fetchgit, filepath, ghc, ghc-paths, ghc-prim
, ghc-simple, HTTP, monads-tf, mtl, network, network-uri, process
@rdesfo
rdesfo / default.nix
Created July 2, 2015 15:26
attempt metasploit default nix
args : with args;
rec {
src = fetchurl {
url = http://downloads.metasploit.com/data/releases/framework-latest.tar.bz2;
sha256 = "1irw71r9rymn826s7rwmk0rmjsk0gdfy75c1wwalln81r25x9n8x";
};
buildInputs = [makeWrapper];
configureFlags = [];
this is a test:
test
#!/usr/bin/python
import sys
import os
#grabs database file and creates a list of lines
asteroids = open('ast_testfile.txt', 'r');
lines = asteroids.readlines()
asteroids.close()
sudo sed -i 's/^\([ \t]*append.*\)/\1 usbhid.quirks=0x0486:0x0186:0x40/' /boot/extlinux/extlinux.conf
@rdesfo
rdesfo / python
Created April 12, 2011 03:32
match issue
#I'm having an issue doing a second compare. I get a list of numbers that match in two lists running the following command. Is there a way to get rid the "set(" ?
<other code>
match = set(tm_col) & set(di_col)
print match
[set(['5567', '2660', '13737', '2320', '799', '798', '643', '981', '669', '8861', '2381', '1947', '3256'])]