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
    
  
  
    
  | // Load our curl helper class we got from StackOverflow | |
| $this->load->helper('Curl'); | |
| $curl = new Curl(); | |
| $html = $curl->get("http://movies.yahoo.com/showtimes/$zipcode"); | |
| // Now that we have the HTML for the page, let's parse it! | |
| $DOM = new DOMDocument; | |
| $DOM->loadHTML(htmlentities($html)); | |
  
    
      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 socket | |
| import random | |
| import itertools | |
| def play(): | |
| for i in range(0,10): | |
| #moves = list(itertools.product([0,1,2], repeat=3)) | |
| #random.shuffle(moves) | 
  
    
      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
    
  
  
    
  | # Local, Mac OS X side | |
| bind-key a send-prefix | |
| set-window-option -g window-status-current-bg red | |
| # Use vim keybindings in copy mode | |
| setw -g mode-keys vi | |
| # Setup 'v' to begin selection as in Vim | |
| bind-key -t vi-copy v begin-selection | 
  
    
      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
    
  
  
    
  | # Remote, Ubuntu side (has xclip installed) | |
| bind-key a send-prefix | |
| set-window-option -g window-status-current-bg red | |
| # Use vim keybindings in copy mode | |
| setw -g mode-keys vi | |
| # Setup 'v' to begin selection as in Vim | 
  
    
      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
    
  
  
    
  | client := &http.Client{} | |
| posturl := server + "deliver_message" // Attempt to hit the deliver_message api call, | |
| values := url.Values{"value1": {someValue}, "value2": {"some constant string"}} // with this info. | |
| data, err := json.Marshal(values) // Turn values into json. | |
| // check err. | |
| req, err := http.NewRequest("POST", posturl, strings.NewReader(string(data))) // Turn json []bytes into a string then ioReader. | |
| // check err. | |
| req.Header.Add("Content-Type", "application/json") // Set the apropriate header. | |
| resp, err := client.Do(req) | |
| // check err. | 
  
    
      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 main | |
| import ( | |
| "net/http" | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| ) | |
| const messagesPath = "/messages/" | 
NewerOlder