Skip to content

Instantly share code, notes, and snippets.

View odra's full-sized avatar
💻

odra odra

💻
  • São Paulo, Brazil
View GitHub Profile
> cordova platform add android --save
Using cordova-fetch for cordova-android@^7.1.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: org.aerogear.js.showcase
Name: cordova_showcase_template
> cordova run android --emulator
Android Studio project detected
Discovered plugin "cordova-plugin-aerogear-metrics" in config.xml. Adding it to the project
[05:44:09] lint finished in 2.55 s
Failed to restore plugin "cordova-plugin-aerogear-metrics" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin cordova-plugin-aerogear-metrics@@aerogear/cordova-plugin-aerogear-metrics@~0.3.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
22,25c22
< "docker.io/aerogear/unifiedpush-wildfly:1.3.1.no-auth.Final",
< "docker.io/centos/postgresql-96-centos7:9.6",
< "docker.io/aerogear/ups-config-operator:master",
< "docker.io/openshift/oauth-proxy:v1.1.0"
---
> "POSTGRES:95"
27c24
< "displayName": "AeroGear Unified Push Server (UPS)",
---
#!/bin/bash
SRC_FOLDER="$PWD/src"
TEAM_ID=''
BUILD_FILE='build.xcconfig'
rm -rf $BUILD_FILE
echo "CODE_SIGN_IDENTITY =" >> $BUILD_FILE
echo "DEVELOPMENT_TEAM = $TEAM_ID" >> $BUILD_FILE
echo "CODE_SIGNING_REQUIRED=NO" >> $BUILD_FILE
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "FG35JLLMXX4A",
"packageType": "development",
"buildFlag": [
"EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
"LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
{
"android": {
"debug": {
"keystore": "../android.keystore",
"storePassword": "android",
"alias": "mykey1",
"password" : "password",
"keystoreType": ""
},
"release": {
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED=NO
ENABLE_BITCODE=NO
from lxml import etree
rss_url = 'http://www.feedforall.com/sample.xml'
document = etree.parse(rss_url)
items = document.xpath('/rss/channel/item')
for item in items:
title = item.xpath('title')[0].text
link = item.xpath('link')[0].text
#!/usr/bin/env python
import importlib
import importlib.util
import pip
def install(name, version=None):
args = [
'install',
@odra
odra / upload.py
Last active March 13, 2017 20:26
s3 uploader
#!/usr/bin/env python
#./upload.py --key KEY --secret SECRET --bucket BUCKET --path /path/to/file --file /absolute-path-to-upload --mimetype image/png --acl public-read
import argparse
import sys
import boto
parser = argparse.ArgumentParser(description='uploads file to s3')
parser.add_argument('--key', '-k', type=str, required=True, help='s3 auth key')