Http Post without Parameter
$ curl -X POST -H ‘Content-Length: 0′ http://127.0.0.1:8080/_qs/listAllInstitutions
Set content-Lenght=0 to avoid HTTP ERROR 411 – ‘Length required’
Http Post with Parameters
Android • Development Notes • Java May 24th, 2015 23:12
curl –data “userId=user-id” http://127.0.0.1:8080/_qs/getUserInfo
Quick start using GCM
0. Create your project via “Google developers console”;
1. Prepare Client App:
– Get device registration ID
– Receive message from GCM
2. Send Message to GCM server
– Send(Post) message to GCM server
3. Start your app(#1), then send message ( #2)
Push message via AWS SNS to Android devices
Login to AWS console
1. Create new application with your GCM API key
2. ‘Create platform endpoint’ using your device registration ID;
3. Select your device and ‘Publish to endpoint’ to publish a message
4. Check your device;
Push Message via Parse Push
Need to modify the client app and then push message from Parse console;Development Notes May 16th, 2015 12:10
0. su – jenkins // no need for Windows
1. Generate RSA key: ssh-keygen
2. Add public key to your bitbucket profile
for 1 and 2, You may follow this instruction:https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
3. [Optional] try to do a git clone, make sure you can clone your project
1. Install git plugin for you jenkins
2. config your jenkins job to use git repo: e.g. firstname.lastname@example.org:user/project.git
Failed to connect to repository : Command “git -c core.askpass=true ls-remote -h email@example.com:user/project.git HEAD” returned status code 128:
stderr: Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
You may add bitbucket.org to your know_host by executing:
git ls-remote firstname.lastname@example.org:accout/project.git ... Are you sure you want to continue connecting (yes/no)? yesPython May 14th, 2015 23:40
Create new thread to perform the progress:
Try to keep a reference:
Use single to update progress:
class UploadTaskQtThread(QtCore.QThread): tick = QtCore.pyqtSignal(int, name="upload_changed") def __init__(self, client, local_path, remote_path): QtCore.QThread.__init__(self) self.client = client self.local_path = local_path self.remote_path = remote_path def on_progress(self, progress): self.tick.emit(progress * 100) def run(self): self.client.upload_file(self.local_path, self.remote_path, self.on_progress)
def upload(self, local_file_path, remote_path): self.upload_thread = UploadTaskQtThread(client, local_file_path, remote_path) self.upload_thread.start() self.upload_thread.tick.connect(ui.progressBar.setValue)分享 March 21st, 2015 12:47
Requirement: The hard drive not working and you want to replace the hard drive and restore OS X from internet.
What you need 需要工具：
Screwdriver #00 and T6 螺丝刀 #00 & T6
Details Steps 详细步骤：
To start your computer from Recovery, restart your Mac and hold down the Command and R keys at startup.
开机时按 Command + R 以开始系统恢复。
Reinstalling OS X using Recovery requires broadband access to the Internet using a Wi-Fi or Ethernet connection.
OS X is downloaded over the Internet from Apple when OS X Recovery is used for reinstallation. You must use DHCP on your Wi-Fi or Ethernet network to reinstall OS X using OS X Recovery.
If you bought OS X from the Mac App Store, you may be prompted to enter the Apple ID and password you used to purchase OS X.
After got internet access, set up the new system following the wizards, it may take hours to download and restore the OS.
More details： https://support.apple.com/en-us/HT201314
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.