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
| $ cat /proc/cgroups | |
| #subsys_name hierarchy num_cgroups enabled | |
| cpuset 0 1 1 | |
| ns 0 1 1 | |
| cpu 0 1 1 | |
| cpuacct 0 1 1 | |
| memory 0 1 1 | |
| devices 0 1 1 | |
| freezer 0 1 1 | |
| net_cls 0 1 1 |
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
| $ uname -a | |
| Linux localhost 2.6.32-220.13.1.el6.x86_64 #1 SMP Thu Mar 29 11:46:40 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux |
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 pytz | |
| import datetime | |
| import time | |
| import urllib2 | |
| import json | |
| import os | |
| import elementtree.ElementTree as ET | |
| # e.g. http://scores.nbcsports.msnbc.com/ticker/data/gamesMSNBC.js.asp?jsonp=true&sport=MLB&period=20120929 | |
| url = 'http://scores.nbcsports.msnbc.com/ticker/data/gamesMSNBC.js.asp?jsonp=true&sport=%s&period=%d' |
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
| <xml> | |
| <Match id="2de567bc9800aa97560f7eecf3295ed83dff0679" sport="baseball" name="Texas Rangers-Los Angeles Angels" date="2012-09-29 22:05" startdate="2012-09-29" starttime="22:05" status="Not started" status_upcoming="yes" status_finished="no" status_inprogress="no" round="1" time_left_current_period=""> | |
| <Competition id="MLB" stageid="MLB_2012" name="MLB" season="2012" countryid="USA" countryname="USA"/> | |
| <Venue name="Rangers Ballpark in Arlington" spectators=""/> | |
| <Competitors> | |
| <Competitor type="1" id="TEXAS-RANGERS" name="Texas Rangers"/> | |
| <Competitor type="2" id="LOS-ANGELES-ANGELS" name="Los Angeles Angels"/> | |
| </Competitors> | |
| <Scores> | |
| <Score type="runningscore" name="-:-"/> |
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
| kill_child_processes() { | |
| isTopmost=$1 | |
| curPid=$2 | |
| childPids=`ps -o pid --no-headers --ppid ${curPid}` | |
| for childPid in $childPids | |
| do | |
| kill_child_processes 0 $childPid | |
| done | |
| if [ $isTopmost -eq 0 ]; then | |
| kill -9 $curPid 2> /dev/null |
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 "LoginViewController.h" | |
| @implementation LoginViewController | |
| @synthesize usernameField; | |
| @synthesize passwordField; | |
| @synthesize loginButton; | |
| @synthesize loginIndicator; | |
| - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
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 <UIKit/UIKit.h> | |
| @class LoginViewController; | |
| @interface LoginAppAppDelegate : NSObject { | |
| UIWindow *window; | |
| LoginViewController *loginViewController; | |
| } | |
| @property (nonatomic, retain) IBOutlet UIWindow *window; |
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 "LoginAppAppDelegate.h" | |
| #import "LoginViewController.h" | |
| @implementation LoginAppAppDelegate | |
| @synthesize window; | |
| @synthesize loginViewController; | |
| - (void)applicationDidFinishLaunching:(UIApplication *)application { |
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 <UIKit/UIKit.h> | |
| @class LoginViewController; | |
| @interface LoginAppAppDelegate : NSObject { | |
| UIWindow *window; | |
| LoginViewController *loginViewController; | |
| } | |
| @property (nonatomic, retain) IBOutlet UIWindow *window; |
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 "LoginViewController.h" | |
| @implementation LoginViewController | |
| @synthesize usernameField; | |
| @synthesize passwordField; | |
| @synthesize loginButton; | |
| @synthesize loginIndicator; | |
| - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |