Create Google Drive webViewLink folders via JavaScript (You must change CLIENT_ID before this will work.)
These folders are suitable for publishing websites. Once the folder is created, simply upload index.html and other resources to the folder.
| #!/bin/sh | |
| curl -s \ | |
| -F "token=APP_TOKEN" \ | |
| -F "user=USER_TOKEN" \ | |
| -F "title=Download Finished" \ | |
| -F "message=$TR_TORRENT_NAME: $TR_TIME_LOCALTIME" \ | |
| http://api.pushover.net/1/messages > /dev/null |
Create Google Drive webViewLink folders via JavaScript (You must change CLIENT_ID before this will work.)
These folders are suitable for publishing websites. Once the folder is created, simply upload index.html and other resources to the folder.
| -- | |
| -- Author: Thiago R. Santos | |
| -- Create date: Aug 3rd 2008 | |
| -- Description: Returns the contents of a given table | |
| -- in JavaScript Object Notation. | |
| -- Params: | |
| -- @table_name: the table to execute the query | |
| -- @registries_per_request: equivalent to "select top N * from table" | |
| -- | |
| -- replacing N by the actual number |
A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.
##Creating the DMG file #Disk Utility
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| android { | |
| applicationVariants.all { variant -> | |
| def flavor = variant.mergedFlavor | |
| def name = flavor.getVersionName() | |
| def versionName = name + '-' + variant.properties.get('flavorName') | |
| if (variant.buildType.isDebuggable()) { | |
| versionName += '-debug'; | |
| } | |
| flavor.versionName = versionName; | |
| } |
| public class CircularProgressDrawable extends Drawable | |
| implements Animatable { | |
| private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator(); | |
| private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator(); | |
| private static final int ANGLE_ANIMATOR_DURATION = 2000; | |
| private static final int SWEEP_ANIMATOR_DURATION = 600; | |
| private static final int MIN_SWEEP_ANGLE = 30; | |
| private final RectF fBounds = new RectF(); |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <!-- google's material design colours from | |
| http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
| <!--reds--> | |
| <color name="md_red_50">#FFEBEE</color> | |
| <color name="md_red_100">#FFCDD2</color> | |
| <color name="md_red_200">#EF9A9A</color> |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.hardware.display.DisplayManager; | |
| import android.os.Bundle; | |
| import android.view.Display; | |
| /** | |
| * A base activity for watch faces that have callbacks for the various screen states (dim, awake, and off) | |
| * as well as a callback for when the watch face is removed. | |
| * <p/> |
| public class BatteryActivity extends Activity { | |
| //UI Elements | |
| private TextView mTextViewLevel; | |
| private TextView mTextViewTemperature; | |
| private TextView mTextViewVoltage; | |
| private TextView mTextViewHealth; | |
| //Battery details | |
| private int level; |