This file contains hidden or 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
| // Usage: | |
| // var buf = new Uint8Array(128); | |
| // var bitstream = new BitStream(buf); | |
| // bitstream.writeBits(12, 0xffff); | |
| // bitstream.seekTo(0); | |
| // bitstream.readBits(6); // 111111 | |
| // bitstream.readBits(10); // 1111110000 | |
| window.BitStream = function(uint8Array) { |
This file contains hidden or 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
| /* | |
| * RC4 symmetric cipher encryption/decryption | |
| * | |
| * @license Public Domain | |
| * @param string key - secret key for encryption/decryption | |
| * @param string str - string to be encrypted/decrypted | |
| * @return string | |
| */ | |
| function rc4(key, str) { | |
| var s = [], j = 0, x, res = ''; |
This file contains hidden or 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
| /** | |
| * Requires node v0.7.7 or greater. | |
| * | |
| * To connect: $ curl -sSNT. localhost:8000 | |
| */ | |
| var http = require('http') | |
| , repl = require('repl') | |
| , buf0 = new Buffer([0]) |
This file contains hidden or 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
| #!/usr/bin/env python | |
| """ | |
| ===================================== | |
| PEP 20 (The Zen of Python) by example | |
| ===================================== | |
| Usage: %prog | |
| :Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <Data> | |
| <Series> | |
| <id>83462</id> | |
| <Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors> | |
| <Airs_DayOfWeek>Monday</Airs_DayOfWeek> | |
| <Airs_Time>10:00 PM</Airs_Time> | |
| <ContentRating>TV-PG</ContentRating> | |
| <FirstAired>2009-03-09</FirstAired> | |
| <Genre>|Drama|</Genre> |
This file contains hidden or 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 socket | |
| import struct | |
| import json | |
| def unpack_varint(s): | |
| d = 0 | |
| for i in range(5): | |
| b = ord(s.recv(1)) | |
| d |= (b & 0x7F) << 7*i | |
| if not b & 0x80: |
This file contains hidden or 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
| /* | |
| * DOMParser HTML extension | |
| * 2019-11-13 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ | |
| /*! @source https://gist.github.com/1129031 */ |
This file contains hidden or 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
| // hi ben | |
| function start() { | |
| var Hf, | |
| i, | |
| start, | |
| If, | |
| Jf; | |
| if (!Gf()) { | |
| aa.writeln(""); | |
| aa.writeln("Your browser does not support the W3C Typed Arrays and this version of JS/Linux needs them.\n"); |
This file contains hidden or 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
| /* | |
| PC Emulator | |
| Copyright (c) 2011 Fabrice Bellard | |
| Redistribution or commercial use is prohibited without the author's | |
| permission. | |
| */ | |
| "use strict"; | |
| var aa; | |
| var ba = [1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, | |
| 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, |
This file contains hidden or 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
| # wget http://bellard.org/jslinux/root.bin | |
| # mkdir mnt | |
| # mount -o loop root.bin mnt | |
| # dd if=/dev/zero of=/tmp/image bs=1k count=4096 | |
| # mke2fs -m 0 -i 2000 /tmp/image | |
| # mkdir mnt2 | |
| # mount -t ext2 -o loop /tmp/image mnt2 | |
| # cp -dpR mnt/* mnt2/ | |
| # umount /mnt2 |