Skip to content

Instantly share code, notes, and snippets.

View stevenroose's full-sized avatar
👀
looking for a decentralized GitHub alternative

Steven Roose stevenroose

👀
looking for a decentralized GitHub alternative
View GitHub Profile
@stevenroose
stevenroose / xinput-bcm5974
Created September 11, 2012 14:05
xinput list-props for bcm5974
xinput list-props 10
Device 'bcm5974':
Device Enabled (121): 1
Coordinate Transformation Matrix (123): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (250): 1
Device Accel Constant Deceleration (251): 2.500000
Device Accel Adaptive Deceleration (252): 1.000000
Device Accel Velocity Scaling (253): 12.500000
Synaptics Edges (254): -3642, 4348, 500, 6125
Synaptics Finger (255): 25, 30, 257
@stevenroose
stevenroose / xinput-logitech
Created September 11, 2012 14:06
xinput list-props for Logitech Optical USB Mouse
xinput list-props 12
Device 'Logitech Optical USB Mouse':
Device Enabled (121): 1
Coordinate Transformation Matrix (123): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (250): 0
Device Accel Constant Deceleration (251): 1.000000
Device Accel Adaptive Deceleration (252): 1.000000
Device Accel Velocity Scaling (253): 10.000000
Device Product ID (240): 1133, 49174
Device Node (241): "/dev/input/event5"
BitcoinArmory steven$ make
cd cppForSwig; make swig
cd leveldb; make libleveldb.a; mv libleveldb.a ..
c++ -I. -I./include -DOS_MACOSX -DLEVELDB_PLATFORM_POSIX -fPIC -O2 -DNDEBUG -c db/c.cc -o db/c.o
db/c.cc:141:15: error: use of undeclared identifier '_strdup'; did you mean
'strdup'?
*errptr = strdup(s.ToString().c_str());
^~~~~~
strdup
db/c.cc:20:16: note: expanded from macro 'strdup'
BitcoinArmory steven$ armory-usb
(ERROR) armoryengine.py:773 - Error getting system details:
Traceback (most recent call last):
File "/Users/steven/BitcoinArmory/armoryengine.py", line 771, in <module>
SystemSpecs = GetSystemDetails()
File "/Users/steven/BitcoinArmory/armoryengine.py", line 763, in GetSystemDetails
raise OSError, "Can't get system specs in OSX"
OSError: Can't get system specs in OSX
(ERROR) armoryengine.py:774 - Skipping.
(ERROR) armoryengine.py:12136 - No BDM method: StartCppLogging
@stevenroose
stevenroose / gist:7109724
Created October 22, 2013 23:04
osx build error bitcoind
llvm-g++ -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -DUSE_UPNP=1 -DUSE_IPV6=1 -I/Users/steven/BitcoinClient/src/leveldb/include -I/Users/steven/BitcoinClient/src/leveldb/helpers -DHAVE_BUILD_INFO -I"/Users/steven/BitcoinClient/src" -I"/Users/steven/BitcoinClient/src"/obj -I"/opt/local/include" -I"/opt/local/include/db48" -o bitcoind -L"/opt/local/lib" -L"/opt/local/lib/db48" leveldb/libleveldb.a obj/alert.o obj/version.o obj/checkpoints.o obj/netbase.o obj/addrman.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/rpcnet.o obj/rpcmining.o obj/rpcwallet.o obj/rpcblockchain.o obj/rpcrawtransaction.o obj/script.o obj/sync.o obj/util.o obj/wallet.o obj/walletdb.o obj/hash.o obj/bloom.o obj/noui.o obj/leveldb.o obj/txdb.o -dead_strip -ldb_cxx-4.8 -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_chrono-mt -lssl -lcryp
EncryptedPrivateKey encrypt(Uint8List privKey, KeyParameter aesKey) {
if(privKey == null || aesKey == null) throw new ArgumentError();
Uint8List iv = new Uint8List(BLOCK_LENGTH);
// TODO fill iv with random bytes from securerandom
ParametersWithIV keyWithIv = new ParametersWithIV(aesKey, iv);
PaddedBlockCipher cipher = new PaddedBlockCipherImpl(new PKCS7Padding(), new CBCBlockCipher(new AESFastEngine()));
cipher.init(true, keyWithIv);
Uint8List encryptedKey = cipher.process(privKey);
Process: dota_osx [1774]
Path: /Users/USER/Library/Application Support/Steam/*/dota_osx
Identifier: dota_osx
Version: ???
Code Type: X86 (Native)
Parent Process: bash [1771]
User ID: 501
Date/Time: 2014-05-18 17:19:40.949 +0200
OS Version: Mac OS X 10.8.5 (12F45)
public void execute(Worm worm){
Map<String, Type> context = new HashMap<String, Type>();
context.put("self", new WormEntityType(worm));
programTree.execute(context);
}
public class AssignmentStatement implements Statement {
String name;
Expression rhs;
public AssignmentStatement(String name, Expression rhs) {
this.name = name;
this.rhs = rhs;
}
public void execute(Map<String, Type> context) {
public abstract class Statement {
public void execute(Map<String, Type> context);
/**
* Updates the global context with the changes made in the local scope.
* Variables newly created in the scope are discarded.
*/
protected void updateContext(Map<String, Type> context, Map<String, Type> scopeContext) {
for(String key : context.keySet()) {