Skip to content

Instantly share code, notes, and snippets.

Adriano Schmidt adrianoschmidt

Block or report user

Report or block adrianoschmidt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View menu-loja-integrada.js
<script>
$('#nivel-um').ready(function()
{
var newItem = document.createElement("li");
newItem.className += ' borda-principal';
var newLink = document.createElement("a");
newLink.className += ' titulo cor-secundaria';
newLink.href = '/pagina/quem-somos.html';
@adrianoschmidt
adrianoschmidt / gulpfile.js
Created May 28, 2016
Changes on gulpfile in order to solve errors from yeoman generator for angularjs with gulp. More datails: http://localhost8080.blogspot.com.br/2016/05/yeoman-gulp-angular-is-not-defined.html
View gulpfile.js
// Generated on 2016-03-15 using generator-angular 0.15.1
// Based on this one: https://github.com/yeoman/generator-angular/issues/1299
'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var openURL = require('open');
var lazypipe = require('lazypipe');
var rimraf = require('rimraf');
var wiredep = require('wiredep').stream;
View Ionic - SQLite no browser
var db = null;
if(window.cordova) {
// used in cell phones
db = $cordovaSQLite.openDB("myapp.db");
} else {
// used in web browsers
db = window.openDatabase("myapp.db", "1.0", "MyApp", -1);
}
@adrianoschmidt
adrianoschmidt / RunLinuxCommandActivity.java
Last active Oct 13, 2015
How to run a linux command in an Android app
View RunLinuxCommandActivity.java
try {
String commandLine = "date";
Process process = Runtime.getRuntime().exec(commandLine);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String value = bufferedReader.readLine();
TextView dateTextView = (TextView) findViewById(R.id.text_view_date);
dateTextView.setText(value);
} catch (IOException e) {
e.printStackTrace();
View map-reduce.js
// map
var idList = list.map(function(entity) {
return entity.id;
});
// reduce
var valueTotal = list.reduce(function(valueTotal, entity) {
return valueTotal + entity.value;
}, 0);
@adrianoschmidt
adrianoschmidt / UnicodeMain.java
Created Jul 28, 2015
Testing unicode character table
View UnicodeMain.java
package br.com.localhost8080.exemplo;
public class UnicodeMain {
/**
* Unicode character table
*/
public static void main(String[] args) {
System.out.println
(
View .gitignore
/target
/.settings
/.classpath
/.project
/ear/target
/ear/.settings
/ear/.project
/ejb/.settings
You can’t perform that action at this time.