Skip to content

Instantly share code, notes, and snippets.

View vanessasoutoc's full-sized avatar

Vanessa Souto vanessasoutoc

View GitHub Profile
@vanessasoutoc
vanessasoutoc / app.js
Last active August 29, 2015 14:08 — forked from lazarofl/app.js
var app = angular.module('app', []);
app.controller("ListagemController", function($scope){
$scope.itens = [];
for (var i = 1; i <= 16; i++) {
$scope.itens.push({text: i});
};
})
$ python rosie.py run
2017-02-14 10:04:27 Creating the CSV file
2017-02-14 10:04:27 Reading the XML file
2017-02-14 10:04:28 Writing record #4,949 to the CSV
2017-02-14 10:04:28 Done!
2017-02-14 10:04:28 Creating the CSV file
2017-02-14 10:04:28 Reading the XML file
2017-02-14 10:05:38 Writing record #343,681 to the CSV
2017-02-14 10:05:38 Done!
2017-02-14 10:05:38 Creating the CSV file
@vanessasoutoc
vanessasoutoc / responsive-imgs.css
Created March 22, 2017 13:01
Resposive image with css
@media (min-width: 1000px) and (max-width:1380px){
.politician-profile .bg-img{
background-image: url(../img/fundo_app_dog_media.png);
height: 90%;
}
}
@media (min-width:720px) and (max-width:1000px){
.politician-profile .bg-img{
background-image: url(../img/fundo_app_dog_peq.png);
@vanessasoutoc
vanessasoutoc / Plano.php
Last active April 7, 2017 16:40
model com relacionamentos
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
@vanessasoutoc
vanessasoutoc / HomeController.php
Created April 11, 2017 11:27
bug_2_graphs_in_one_page_blade_php
<?php
namespace SniffPolitic\Http\Controllers;
use Illuminate\Http\Request;
use ArrayObject;
use SniffPolitic\Despesa;
use SniffPolitic\User;
use SniffPolitic\Politician;
@vanessasoutoc
vanessasoutoc / json_to_mysql.py
Created April 20, 2017 13:13
Insert data to json file for mysql db
import mysql.connector
import json
from pprint import pprint
print('Antes Mysql')
cnx = mysql.connector.connect(user='root', password='7qt5wzs6',
host='mypolitician02',
database='meupolitico')
@vanessasoutoc
vanessasoutoc / json_large.py
Created April 27, 2017 14:18
Read large json in python with ijson
import ijson
jsonData = ijson.items(open('file_path/file.json', encoding='latin-1'), 'DESPESA.item')
for prefix in jsonData:
for key,value in prefix.items():
print('key: ', key)
print(' value: ', value)
<VirtualHost *:80>
ServerAdmin webmaster@oficina5.com.br
DocumentRoot /home/vanessa/oferecimento/dist
ServerName oferecimento.dev.oficina5.com.br
ServerAlias oferecimento.dev.oficina5.com.br
<Directory "/home/vanessa/oferecimento/dist/">
AllowOverride All
</Directory>
<VirtualHost *:80>
ServerAdmin webmaster@oficina5.com.br
DocumentRoot /home/vanessa/oferecimento/dist
ServerName oferecimento.dev.oficina5.com.br
ServerAlias oferecimento.dev.oficina5.com.br
<Directory "/home/vanessa/oferecimento/dist/">
AllowOverride All
</Directory>
@vanessasoutoc
vanessasoutoc / .htaccess
Created December 7, 2017 01:42
Erros das rotas do Angular em produção
#Erro de rota no Angular 4, após gerar versão de produção (Apache)
#$ ng build --prod
#Acrescentar na pasta dist/ um arquivo com nome de .htaccess com os dados abaixo!
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]