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
<link rel="import" href="../topeka-elements/category-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../core-pages/core-pages.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
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
#!/bin/sh | |
contactstore=./contactstore | |
temp=~/.tempcontacts | |
cat ${contactstore}/*vcf > $temp | |
adb shell pm clear com.android.contacts | |
adb shell pm clear com.android.providers.contacts | |
adb push $temp /sdcard/contacts-import.vcf | |
adb shell am start -t "text/vcard" -d "file:///sdcard/contacts-import.vcf" -a android.intent.action.VIEW com.android.contacts |
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 abstract class BaseActivity extends AppCompatActivity { | |
@LayoutRes int getLayout() { | |
int layoutResId =-1; | |
Class screenType = getClass(); | |
Layout layout = (Layout) screenType.getAnnotation(Layout.class); | |
if (layout == null) { | |
throw new IllegalArgumentException( | |
String.format("@%s annotation not found on class %s", Layout.class.getSimpleName(), | |
screenType.getName())); | |
} |
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
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { | |
Context appContext = mWeakActivity.get().getApplicationContext(); | |
return FileProvider. | |
getUriForFile(appContext, appContext.getPackageName() + ".provider", file); | |
}else { | |
return Uri.fromFile(file); | |
} | |
-------------------------------- | |
Add to 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
class IgnoreSSL { | |
static X509TrustManager doNotValidateTrustManager() { | |
// Create a trust manager that does not validate certificate chains | |
return new X509TrustManager() { | |
@Override | |
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) { | |
} | |
@Override |
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
import 'package:bill_scanner/generated/i18n.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( |
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/env ruby | |
# | |
# Git commit-msg hook. If your branch name is in the form "ABCDE-1234567-postfix", or | |
# "ABCDE-1234567_postfix", it automatically adds the prefix "ABCDE-1234567 |" to commit | |
# messages. | |
# | |
# Example | |
# ======= | |
# | |
# git checkout -b ABCDE-1234567-some-cool-feature |
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/env ruby | |
# | |
# Git commit-msg hook. If your branch name is in the form "ABCDE-1234567-postfix", or | |
# "ABCDE-1234567_postfix", it automatically adds the prefix "ABCDE-1234567 |" to commit | |
# messages. | |
# | |
# Example | |
# ======= | |
# | |
# git checkout -b ABCDE-1234567-some-cool-feature |
OlderNewer