I hereby claim:
- I am dchest on github.
- I am dchest (https://keybase.io/dchest) on keybase.
- I have a public key whose fingerprint is F466 022B 936F 90F0 FCBB 50BA BE06 B1CD 3F41 D32D
To claim this, I am signing this object:
!function(a,b){"use strict";function c(){var a=Error.apply(this,arguments);this.message=a.message,this.stack=a.stack}function d(){var a=Error.apply(this,arguments);this.message=a.message,this.stack=a.stack}function e(){var a=Error.apply(this,arguments);this.message=a.message,this.stack=a.stack}function f(a){for(var b=a.length,c=new Uint8Array(b),d=0;b>d;d++){var e=a.charCodeAt(d);if(e>>>8)throw new Error("Wide characters are not allowed");c[d]=e}return c}function g(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b}function h(a){for(var b=(a.byteLength||a.length)/a.length,c="",d=0;d<a.length;d++){var e=a[d].toString(16);e.length<2*b&&(c+="00000000000000".substr(0,2*b-e.length)),c+=e}return c}function i(a){return btoa(g(a))}function j(a){return"string"==typeof a}function k(a){return a instanceof ArrayBuffer}function l(a){return a instanceof Uint8Array}function m(){return this.result=null,this.pos=0,this.len=0,this.asm.reset(),this}function n(a){if(null!==this.result)throw new c("state mus |
function rc4(f,F,g,G){for(var U=256,b=[],c=a=0,d;U>a;a++)b[a]=a;for(a=0;U>a;a++)c=(c+b[a]+f[a%F])%U,d=b[a],b[a]=b[c],b[c]=d;for(var e=c=a=0;e<G;e++)a++,a%=U,c+=b[a],c%=U,d=b[a],b[a]=b[c],b[c]=d,g[e]=b[(b[a]+b[c])%U]} | |
// Usage: | |
// | |
var key = [75, 101, 121]; // input bytes: "Key" | |
var out = new Array(10); // place for keystream bytes | |
rc4(key, key.length, out, out.length); // out now contains keystream: [235, 159, 119, 129, 183, 52, 202, 114, 167, 25] |
I hereby claim:
To claim this, I am signing this object:
import Foundation | |
func randomStringWithLength (len : Int) -> NSString { | |
// from http://stackoverflow.com/a/26845710/311196 | |
let letters : NSString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
var randomString : NSMutableString = NSMutableString(capacity: len) | |
for (var i=0; i < len; i++){ |
#!/usr/bin/env perl | |
use File::Temp qw/ tempdir /; | |
use File::Path qw/ rmtree /; | |
use File::Spec::Functions; | |
print "autobuild (C) 2009 Dmitry Chestnykh and friends (http://twitter.com/dchest/friends)\n\n"; | |
if ($#ARGV < 3) { | |
usage(); |
/* | |
* Copyright (c) 2005 Apple Computer, Inc. All rights reserved. | |
* | |
* @APPLE_LICENSE_HEADER_START@ | |
* | |
* The contents of this file constitute Original Code as defined in and | |
* are subject to the Apple Public Source License Version 1.1 (the | |
* "License"). You may not use this file except in compliance with the | |
* License. Please obtain a copy of the License at | |
* http://www.apple.com/publicsource and read it before using this file. |
#!/usr/bin/env ruby | |
# | |
# Git log to iCalendar | |
# | |
# Written by Dmitry Chestnykh, 5 Aug 2008 | |
# Public domain | |
# | |
# Usage: | |
# | |
# cd git-repo |
// -------------------- CRSegmentedCell.h ------------------------------ | |
#import <Cocoa/Cocoa.h> | |
@interface CRSegmentedCell : NSSegmentedCell { | |
NSInteger highlightedSegment; | |
} | |
@property(assign) NSInteger highlightedSegment; | |
@end |
~/Projects/MacRuby-trunk $ sudo rake install --trace | |
(in /Users/dmitry/Projects/MacRuby-trunk) | |
** Invoke install (first_time) | |
** Invoke framework:install (first_time) | |
** Invoke framework:info_plist (first_time) | |
** Execute framework:info_plist | |
** Invoke framework:install_ext (first_time) | |
** Execute framework:install_ext | |
cd ext/ripper | |
/usr/bin/make top_srcdir=../.. ruby="../../miniruby -I../.. -I../../lib" extout=../../.ext hdrdir=../../include arch_hdrdir=../../include install |