Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
import subprocess | |
import os | |
import re | |
import sys | |
import argparse | |
import httplib, urllib | |
import time | |
""" | |
# place this file at /home/ethos/check_hash_reboot.py |
import subprocess | |
import os | |
import re | |
import sys | |
import argparse | |
import httplib, urllib | |
import time | |
""" | |
# place this file at /home/ethos/check_hash_reboot.py |
apt-get install software-properties-common debian-archive-keyring -y | |
add-apt-repository 'deb http://httpredir.debian.org/debian experimental main' | |
add-apt-repository 'deb http://httpredir.debian.org/debian sid main' | |
cat >/etc/apt/preferences.d/debian <<EOL | |
Package: * | |
Pin: release o=Debian,n=experimental | |
Pin-Priority: -1 | |
Package: * |
{ | |
version_code: 2, | |
content: "Version 1.0.1" | |
} |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
function doesTheMailRunToday(today) | |
{ | |
var reason = ''; | |
if (today.is().sunday()) | |
reason = "It's Sunday."; | |
else if (today.equals(Date.parse("January 1"))) | |
reason = "It's New Year's."; | |
else if (today.equals(Date.january().third().monday())) | |
reason = "It's Martin Luther King Day."; | |
else if (today.equals(Date.february().third().monday())) |
//Called in onCreate | |
private void setupInstall() { | |
InstallObject install = new SettingsProvider(this).getInstallObject(); | |
if (install == null || install.getFirstInstall() == -1) { | |
ParseInstallObject.createInstall(this, | |
new ParseInstallObject.IParseInstallFinished() { | |
@Override | |
public void finished(ParseInstallObject obj) { | |
new SettingsProvider(MainActivity.this) | |
.setParseInstallObject(obj); |
#!/bin/sh | |
#Define Manifest file and current versionCode. | |
manf=AndroidManifest.xml | |
versCode=`sed -n '/versionCode=/s/.*"\([0-9][0-9]*\)".*/\1/p' $manf` | |
#versionCode is a number, so simply add 1. | |
newVersCode=$((versCode + 1)) | |
#Swap old versionCode with new versionCode and write it to the file | |
sed /versionCode=/s/'"'$versCode'"'/'"'$newVersCode'"'/ $manf >new$manf && cp new$manf $manf && rm -f new$manf |
In the Facebook SDK, find Utility.java and modify the method getMetadataApplicationId as follows, where TESTING_KEY is the signature of the Android DEBUG key on your machine that Eclipse uses when you select the "Run" option. | |
If the code detects youre using that DEBUG key, it uses one of the sample Facebook SDK app ids, otherwise it uses the value defined in the manifest. Useful to avoid having to change the app id when compiling a release candidate vs an internal testing build generated by Eclipse. | |
public static String getMetadataApplicationId(Context context) { | |
Validate.notNull(context, "context"); | |
Signature[] appSigs; | |
try { | |
appSigs = context.getPackageManager().getPackageInfo( |