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
var app = require('app'); | |
var BrowserWindow = require('browser-window'); | |
app.on('window-all-closed', function() { | |
app.quit(); | |
}); | |
app.on('ready', function() { | |
new BrowserWindow({width: 1024, height: 600}) | |
.loadUrl('http://mozilla.github.io/pdf.js/web/viewer.html') |
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
'use strict' | |
### Sevices ### | |
angular.module('app.services', []) | |
.factory 'version', -> "0.1" | |
# COPIAR DAQUI PARA BAIXO | |
.service 'historyService', class | |
constructor: (@$window, $rootScope, $location)-> |
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
<?php | |
$notas = [ | |
999 => 8, | |
456 => 3, | |
789 => 5, | |
123 => 2, | |
]; // 8 5 3 2 | |
asort($notas); |
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
# cria um emulador ios para cordova | |
cordova create emulator | |
cd emulator | |
git init | |
git add . | |
git commit -m 'cordova create emulator' | |
for name in battery-status camera console contacts device device-motion device-orientation dialogs file file-system-roots file-transfer geolocation globalization inappbrowser media media-capture network-information plugin.softkeyboard speech.speechsynthesis splashscreen statusbar vibration | |
do |
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
<?php | |
use Isse\Db\SetUp; | |
require_once __DIR__ . '/../bootstrap/execsh.php'; | |
$host = DB_HOST; | |
$db = DB_NAME; | |
$oracle_pdo = new PDO("oci:dbname=$host/$db", DB_USER, DB_PWD); | |
$oracle_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
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
<?php | |
class DB2PHP { | |
public function __construct($dir, $conn, $records_per_page = 1000) { | |
@mkdir($dir); | |
$this->dir = $dir; | |
$this->conn = $conn; | |
$this->records_per_page = $records_per_page; | |
} |
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
<?php | |
class DB2PHP { | |
public function __construct($dir, $conn, $records_per_page = 1000) { | |
@mkdir($dir); | |
$this->dir = $dir; | |
$this->conn = $conn; | |
$this->records_per_page = $records_per_page; | |
} |
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
<?php | |
$file = $argv[1]; | |
$pdo = new PDO('mysql:host=localhost;dbname=log', 'root', ''); | |
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$stmt = $pdo->prepare("INSERT INTO logs SET | |
data = ?, | |
elapse = ?, | |
ip = ?, |
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
[{"value":"john"},{"value":"julia"},{"value":"johnson"},{"value":"juliet"}] |
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
# shell functions to setup rails features | |
# https://gist.github.com/c6180ddda37377a8613a | |
# rt == rails_template | |
# source rails-template.sh | |
# rails new appname -B | |
# cd appname | |
rt_init() { | |
git init | |
git add . |