This file contains 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
let task = Process() | |
var args = [String]() | |
args.append("-c") | |
let bundle = Bundle.main.bundlePath | |
args.append("sleep 0.2; open \"\(bundle)\"") | |
task.launchPath = "/bin/sh" | |
task.arguments = args | |
task.launch() | |
NSApplication.shared().terminate(nil) |
This file contains 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
// | |
public class Note { | |
String to; | |
String from; | |
String heading; | |
String body; | |
} |
This file contains 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
public class GridActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.grid); | |
final GridViewPager mGridPager = (GridViewPager) findViewById(R.id.pager); | |
mGridPager.setAdapter(new SampleGridPagerAdapter(this, getFragmentManager())); | |
} |
This file contains 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.testSingleton; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
public class ActivityA extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { |
This file contains 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
#!/usr/bin/python | |
# TODO make range command line arguments | |
import sys, codecs | |
sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # if your terminal can't do utf-8, well... | |
import time | |
import urllib2 | |
import BeautifulSoup |
This file contains 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
#!/usr/bin/python | |
# TODO make range command line arguments | |
import sys, codecs | |
sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # if your terminal can't do utf-8, well... | |
import time | |
import urllib2 | |
import BeautifulSoup |
This file contains 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://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) */ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, |
This file contains 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
application: you-app-name-here | |
version: 1 | |
runtime: python | |
api_version: 1 | |
default_expiration: "30d" | |
handlers: | |
- url: /(.*\.(appcache|manifest)) | |
mime_type: text/cache-manifest |
This file contains 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
<?php | |
// Stupidly simple PHP proxy for AJAX (HTTP GET) requests. Written by Kevin Lanni. | |
$dest = ''; // Set to the remote script URL (i.e. http://remotehost.com/some.php) | |
$a = array(); | |
foreach ($_GET as $k=>$v) { | |
$a[] = "{$k}={$v}"; | |
} |
This file contains 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
/* | |
https://github.com/tmpvar/jsdom/tree/master/lib | |
$ curl http://www.timeanddate.com/norsk/kalender.html | |
(...) | |
<div id=po1 class=po></div> | |
<h1>Kalender for år 2011</h1> | |
<table class="ct" border="0" cellpadding="4" cellspacing="0" align="center"> | |
(...) | |
$ node scrape.js |
NewerOlder