Skip to content

Instantly share code, notes, and snippets.

View realrasengan's full-sized avatar

Andrew Lee realrasengan

View GitHub Profile
@realrasengan
realrasengan / bb.js
Created July 25, 2012 02:19
Bitcoin Balance
var self = Ti.UI.createWindow({
backgroundColor:'#000000',
exitOnClose:true
});
self.addEventListener('android:back', function(e){
self.close();
var activity = Titanium.Android.currentActivity;
activity.finish();
});
var Barcode = require("ti.barcode"); // include barcode
@realrasengan
realrasengan / bb.js
Created July 25, 2012 02:23
Bitcoin Balance
var Barcode = require("ti.barcode");
Barcode.addEventListener('success', function (e) {
Ti.Platform.openURL("http://blockexplorer.com/address/"+unescape(e.result).match(/([^\?]*)/)[1].replace("bitcoin:",""));
self.close();
var activity = Titanium.Android.currentActivity;
activity.finish();
});
Barcode.capture({
animate: false,
showCancel: false,
@realrasengan
realrasengan / bb.js
Created July 25, 2012 21:28
Bitcoin Balance 3
var Barcode = require("ti.barcode");
Barcode.addEventListener('success', function (e) {
// Ti.Platform.openURL("http://blockexplorer.com/address/"+unescape(e.result).match(/([^\?]*)/)[1].replace("bitcoin:",""));
//
// "If using regex, then why not just use regex to snip out the first contiguous group of say 28-34 characters starting with '1'
// and the rest matching the base58 alphabet? This would make it highly universal without adding any complexity." -- casascius
var btcAddress = unescape(e.result).match(/([1][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{27,34})/)
if(btcAddress!=null)
Ti.Platform.openURL("http://blockexplorer.com/address/"+btcAddress[1]);
self.close();
bcrypt password hashing
by rasengan <rasengan on Rizon or Freenode>
1. Added to weechat/src/plugins/relay/CMakeLists.txt
weechat/bcrypt/bcrypt.c weechat/bcrypt/bcrypt.h
weechat/bcrypt/crypt_blowfish/crypt_gensalt.h
weechat/bcrypt/crypt_blowfish/crypt_blowfish.c
weechat/bcrypt/crypt_blowfish/crypt.h weechat/bcrypt/crypt_blowfish/ow-crypt.h
weechat/bcrypt/crypt_blowfish/wrapper.c
@realrasengan
realrasengan / Serverless Weechat + Glowing Bear on Android
Created October 17, 2017 00:06
Run weechat + Glowing Bear on your Android without any third party service.
1. Download Termux
2. Open Termux
3. In Termux, type: pkg update
4. In Termux, type: pkg upgrade
5. In Termux, type: pkg install tmux weechat
6. Optionally, type: weechat-dev weechat-lua-plugin weechat-perl-plugin weechat-python-plugin weechat-ruby-plugin
7. Optionally, type: wget https://rasengan.publichtml.site/tmux.conf && mv tmux.conf .tmux.conf
8. Type: tmux
9. Type: weechat
10. In weechat, type: /relay add weechat 9001
#!/data/data/com.termux/files/usr/bin/sh
proot -0 -r ~/stretch -b /dev/ -b /sys/ -b /proc/ -b /data/data/com.termux/files/home /bin/env -i HOME=/root TERM="xterm-256color" PS1='[root@stretch \W]$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/bin /bin/bash --login
@realrasengan
realrasengan / client.js
Created July 5, 2021 22:06
IRC Client for IRC.com Remotes v0.02
const Console = require("./lib/console.js");
const $ = new (require("./lib/irc.js"))("nickname","token",true);
let startup=false;
let app = `var style = $(\`<style>
#box {
z-index:100000;
position:absolute;
left:0;
top:40px;