Sunday, January 9, 2022

Solana paper wallet to Phantom

Easiest way:

1) Create a new Phantom wallet, grab the pub key
2) In terminal, say you want to transfer 0.17 SOL `solana transfer SOL --allow-unfunded-recipient`, assuming the new phantom wallet has no funds


Thursday, February 20, 2014

Friday, December 27, 2013

OSX Mavericks 10.9 + OpenCV 2.4.7 + Eclipse Juno WITHOUT CUDA

Note to self, note to self, note to self

Setting up

1) Download OpenCV2.4.7
2) Extract the file
3) mkdir build inside the directory (where you extract openCV2.4.7 to)
4) cd build
5)

cmake -G "Unix Makefiles" -D CMAKE_CXX_COMPILER=/usr/bin/g++ -D CMAKE_C_COMPILER=/usr/bin/gcc -D CMAKE_CXX_FLAGS:STRING='-stdlib=libc++ -std=gnu++11' -D BUILD_PERF_TESTS=OFF -D BUILD_opencv_legacy=NO -D CMAKE_OSX_ARCHITECTURES=x86_64 -D WITH_CUDA=OFF  ..

6) make -j4
7) in Eclipse Juno, create a user library, Eclipse > Preferences > Java > Build Path > User Libraries > New > [Type OpenCV2.4.7] > Add External JARS
8) a) for jar file, browse to opencv-247.jar (usually in build/bin/opencv-247.jar)
8) b) also for native library location, browse to the lib directory (usually in build/lib)

Testing the linkage (in Eclipse Juno)

1) Create a new project
2) Link to OpenCV2.4.7 library by

Right Click your project > Properties > Add Library > User Library > Select OpenCV2.4.7

3) Create a class file with a main function > and duplicate the following codes
//opencvimport org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
public class Tester {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Mat mat = Mat.eye(3, 3, CvType.CV_8UC1);
System.out.println("mat= "+mat.dump());
}
}

4) Look at the *beaut* in the console now.

*DISCLAIMER*
Unfortunately, i am still figuring out to make this work with CUDA.  Until then .. until then..

Thursday, November 21, 2013

Mavericks OSX 10.9, HTTPS proxy, infinite loop of authentication boxes

If you are behind an obnoxious and thick-as-a-brick proxy, you will quickly find that an upgrade to 10.9 from 10.8 (or any earlier versions) will break your Safari, OSX software update, iTunes etc...

This is largely because of a semi-known bug with HTTPS proxy in KeyChain.   This blog post serves as a summary of what you can do in order to fix the problem (at least, let you get a decent OSX software update from App Store and see what happens there)

I have sorted the potential fixes in the order of likelihood to fix the problem.  For every fix, please open up Safari and see if the fix works(go to any of your favourite *internet* websites).  If yes, stop and go to Software Update.  If no, proceed with the next fix or leave me comments.

Fix #0

Before we proceed, you must make sure that you are comfortable with configuring proxy connections in OSX.  [System Preferences > Network > Network Interface > Advanced > Proxies]
Make sure, where necessary, you have your information input correctly in one or all of the followings:

  • Automatic Proxy Configuration
  • Web Proxy (HTTP)
  • Secure Proxy (HTTPS)
  • other proxies if applicable



Fix #1

As mentioned earlier, if you are like me that likes to dig in, search and look for the one thing that I want to see, you can actually go to [ Utilities > Console ] and you shall see the error messages that Mavericks complains every time it tries to look for the HTTPS key in the Key Chain

1) Open Utilities > KeyChain Access.app
2) In [login], you should see your proxy entries



3) Right click and select copy
4) In [system], if you see something similar, i suggest you remove those entries first (we will add them again in the next step)
5) In [system], right click and click paste (if it asks for your credentials, just enter your credentials and click ok)
6) Make sure one entry is for HTTP and one entry is for HTTPS and make sure the Account Name and Password are correct (you can check this by double clicking the entry)
7) For every one of the entries you just pasted, double click (enter credential if necessary) and go to Access Control
8) Select Allow all applications to access this item, click save changes and restart computer
9) Some applications might still ask you for permission to use the key in KeyChain, just say yes and enter the necessary credential

Fix #2

1) Open Utilities > Terminal.app > Type the following 2 commands.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.UserNotificationCenter.plist
sudo launchctl load - w /System/Library/LaunchDaemons/com.apple.UserNotificationCenter.plist
2) Restart computer

Fix #3
1) Open Utilities > Terminal.app
2) sudo vi /etc/hosts
3) make sure the ip address to your proxy is set there (ie. 192.168.0.1 proxy.abc.org) and press shift+: and type wq.
4) Restart computer


References
Just poke google with keywords like mavericks 10.9 https secure proxy safari app store



Friday, May 10, 2013

Watch Pronunciation

Audemars Piguet:OH-duh-MAHR PEA-GAY
A. Lange & Sohne:AH Lung-Geh Oohnt Sew-neh
Baume & Mercier:bohm AY mer-SEE-AY
Bedat:bid-UT
Breitling:brEYE-tling
Bulgari:bull-gar-EE
Carl F. Bucherer:Carl F BOOK-er-er
Cartier:Car-TEA-AY
Chanel:Shan-el
Chopard:Show-Par
Concord:Con-cord
Corum:Core-oom
Cvstos:COUS-toss
De Witt:Dah-Wit
Dior:DEE-oar
Ebel:AY-bell
Franck Muller:Fronk MEW-ler
Girard-Perregaux:Jee-rar Pear-ago
Hublot:OOH-blow
IWC:EYE-DOUBLE-YOU-SEE
Jaeger-LeCoultre:YAY-ger Le-Cool-ter
Movado:Moe-vah-doh
Oris:Oris
Panerai:Pun-a-rye
Parmigiani:Par-mi-GEE-ah-NEE
Patek Philippe:Pah-tek Fee-LEAP
Philippe Charriol:Fee-LEAP Shar-ee-ole
Piaget:PEE-ah-JAY
Raymond Weil:Ray-mand WHILE
Richard Mille:REE-Shar MEAL
Rolex:Row-Lex
TAG Heuer:Tahg Hoy-er
Ulysse Nardin:YOU-lis Nur-den
Vacheron Constantin:Va-sher-own Cone-Stun-tuhn
Zenith:ZEE-nith

Reference: http://www.gemnation.com/base?processor=getPage&pageName=watch-pronunciation

Monday, April 22, 2013

Unit Axes of a Cube



UnitAxes = ...
    [1 1 -1;...
    1 1 0; ...
    1 1 1; ...
    0 1 1; ...
    -1 1 1; ...
    -1 1 0; ...
    -1 1 -1; ...
    0 1 -1; ...
    
    1 0 -1;...
    1 0 0; ...
    1 0 1; ...
    0 0 1; ...
    -1 0 1; ...
    -1 0 0; ...
    -1 0 -1; ...
    0 0 -1; ...
    
    1 -1 -1;...
    1 -1 0; ...
    1 -1 1; ...
    0 -1 1; ...
    -1 -1 1; ...
    -1 -1 0; ...
    -1 -1 -1; ...
    0 -1 -1; ...
    
    0 1 0;...
    0 -1 0];
    

Thursday, September 13, 2012

Rotating 3D Figures in Octave

When Octave.app is executed, input the followings
> close all 
> setenv ("GNUTERM", "x11") 

There you go.

I'm sharing this original post from http://octave.1599824.n4.nabble.com/rotate-3d-graphics-td1638659.html