This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.bobo.sensorapp; | |
| import android.content.Intent; | |
| import android.os.AsyncTask; | |
| import android.support.v7.app.ActionBarActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.Menu; | |
| import android.view.MenuItem; | |
| import android.view.View; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@ page language="java" contentType="text/html; charset=UTF-8" | |
| pageEncoding="UTF-8"%> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>Insert title here</title> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Step 1: | |
| git clone https://github.com/vik-y/cf-ex-phpmyadmin | |
| Step 2: | |
| Create a Clear DB Service on IBM Bluemix | |
| Step 3: | |
| Create a PHP application on bluemix, we'll upload phpmyadmin code in this application | |
| Step 4: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Go to IBM Bluemix Catalog | |
| Use the Wordpress Boiler plate. | |
| Download the Start code and upload it on Bluemix using cf push <app name> | |
| That's it. Wordpress deployed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| A basic implementation of calling Alchemy API using python. | |
| I have used request library but you can use urllib too | |
| ''' | |
| import requests | |
| import json | |
| from BeautifulSoup import BeautifulSoup | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| from itertools import combinations | |
| import math | |
| import copy | |
| def euclid(a, b): | |
| """returns the Greatest Common Divisor of a and b""" | |
| a = abs(a) | |
| b = abs(b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "laravel/laravel", | |
| "description": "The Laravel Framework.", | |
| "keywords": ["framework", "laravel"], | |
| "license": "MIT", | |
| "type": "project", | |
| "require": { | |
| "laravel/framework": "4.2.*" | |
| }, | |
| "autoload": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> res,unans = traceroute(["www.microsoft.com","www.cisco.com","www.yahoo.com","www.wanadoo.fr","www.pacsec.com"],dport=[80,443],maxttl=20,retry=-2) | |
| Received 190 packets, got 190 answers, remaining 10 packets | |
| 193.252.122.103:443 193.252.122.103:80 198.133.219.25:443 198.133.219.25:80 207.46... | |
| 1 192.168.8.1 192.168.8.1 192.168.8.1 192.168.8.1 192.16... | |
| 2 82.251.4.254 82.251.4.254 82.251.4.254 82.251.4.254 82.251... | |
| 3 213.228.4.254 213.228.4.254 213.228.4.254 213.228.4.254 213.22... | |
| [...] | |
| >>> res.graph() # piped to ImageMagick's display program. Image below. | |
| >>> res.graph(type="ps",target="| lp") # piped to postscript printer | |
| >>> res.graph(target="> /tmp/graph.svg") # saved to file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #http://curl.haxx.se/docs/httpscripting.html#GET Use this link for further reference | |
| curl --referer http://www.example.come http://www.example.com | |
| # To fake the referrer header | |
| curl --location http://www.example.com | |
| # To make curl follow the redirects as well | |
| curl --upload-file uploadfile http://www.example.com/receive.cgi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package APIConnect; | |
| import android.util.Base64; | |
| import android.util.Log; | |
| import android.widget.Toast; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.NameValuePair; | |
| import org.apache.http.client.HttpClient; | |
| import org.apache.http.client.entity.UrlEncodedFormEntity; |