I hereby claim:
- I am andrew-codechimp on github.
- I am codechimp (https://keybase.io/codechimp) on keybase.
- I have a public key ASBNplcLzvfVz0837RbWQpxavZ1KAwI8wNnCb8tDmebqqgo
To claim this, I am signing this object:
| // Handles the user's menu selection. | |
| @Override | |
| public boolean onOptionsItemSelected(MenuItem item) { | |
| switch (item.getItemId()) { | |
| case R.id.menu_settings: | |
| @SuppressWarnings("rawtypes") | |
| Class c = Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB ? PreferencesActivity.class : FragmentPreferences.class; | |
| Intent i = new Intent(this, c); |
| package your.package.name; | |
| import android.app.NotificationManager; | |
| import android.app.PendingIntent; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.support.v4.app.NotificationCompat; | |
| import android.support.v4.app.TaskStackBuilder; | |
| public class OngoingNotification { |
| private Account getAccount(String accountName) { | |
| AccountManager manager = (AccountManager) getActivity().getSystemService(Activity.ACCOUNT_SERVICE); | |
| Account[] list = manager.getAccounts(); | |
| for (Account account : list) { | |
| if (account.type.equalsIgnoreCase("com.google")) { | |
| if (account.name.equalsIgnoreCase(accountName)) { | |
| return account; | |
| } | |
| } | |
| } |
| ... | |
| signingConfigs { | |
| debug { | |
| storeFile rootProject.file('debug.keystore') | |
| storePassword "android" | |
| keyAlias "androiddebugkey" | |
| keyPassword "android" | |
| } | |
| release | |
| } |
| Tag To Push - v${BUILD_NUMBER}0 | |
| Tag Message - Version ${BUILD_NUMBER}0 |
I hereby claim:
To claim this, I am signing this object:
| android { | |
| ... | |
| signingConfigs { | |
| debug { | |
| storeFile file("debug.keystore") | |
| storePassword "android" | |
| keyAlias "androiddebugkey" | |
| keyPassword "android" | |
| } | |
| release |
| sensor: | |
| - platform: rest | |
| resource: https://cdn.syndication.twimg.com/widgets/followbutton/info.json?screen_names=AndrewCodeChimp | |
| name: Twitter Followers | |
| value_template: '{{ value_json[0].followers_count }}' | |
| scan_interval: 43200 # Every 12 hours in seconds | |
| extension Sequence where Iterator.Element: Hashable { | |
| func unique() -> [Iterator.Element] { | |
| // Usage | |
| // print(array.unique()) // prints: [1, 2, 3] | |
| var seen: Set<Iterator.Element> = [] | |
| return filter { seen.insert($0).inserted } | |
| } | |
| } | |
| ... | |
| switch: | |
| - platform: command_line | |
| switches: | |
| portainer_transmission: | |
| command_on: "/bin/bash /config/portainer_transmission_start.sh" | |
| command_off: "/bin/bash /config/portainer_transmission_stop.sh" | |
| command_state: "/bin/bash /config/portainer_transmission_state.sh" | |
| friendly_name: "Portainer Transmission" | |
| ... |