Skip to content

Instantly share code, notes, and snippets.

View bernar83's full-sized avatar
💭
Hopefully not breaking things...

Adrian Bernardo bernar83

💭
Hopefully not breaking things...
  • Near a text editor
View GitHub Profile
import React, { Component } from 'react'
class DogItem extends Component {
handleDelete(name) {
this.props.deleteDog(name);
}
render() {
return (
<div>
import React, { Component } from 'react'
import DogItem from './DogItem';
class Dogs extends Component {
handleDelete(name) {
this.props.deleteDog(name);
}
render() {
let dogItem = <p>No dogs :(</p>
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import AddDog from './AddDog';
import Dogs from './Dogs';
class App extends Component {
constructor(props) {
super(props)
import React, { Component } from 'react'
class AddDog extends Component {
constructor(props) {
super(props)
this.state = {
newDog: {},
name: '',
image: '',
@bernar83
bernar83 / app.py
Created April 22, 2018 03:40
flask tutorial login
import os
import sqlite3
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
app = Flask(__name__)
app.config.from_object(__name__)
app.config.update(dict(
DATABASE=os.path.join(app.root_path, 'flaskr.db'),
SECRET_KEY='development key',
@bernar83
bernar83 / flaskr.py
Created April 19, 2018 18:12
flaskr.py file from flask tutorial
import os
import sqlite3
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
app = Flask(__name__)
app.config.from_object(__name__)
app.config.update(dict(
DATABASE=os.path.join(app.root_path, 'flaskr.db'),
SECRET_KEY='development key',
import React from 'react';
import axios from 'axios';
function getFlights() {
const dest = "SFO";
const url = 'https://www.googleapis.com/qpxExpress/v1/trips/search?key=AIzaSyCqLj6JPkZgBK8E9QZtgWBAO9OcVYaQrKc';
const data = {
"request": {
"slice": [
{
@bernar83
bernar83 / speller.c
Last active September 11, 2017 00:28
/**
* Implements a dictionary's functionality.
*/
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <strings.h>
/**
* Copies a BMP piece by piece, just because.
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "bmp.h"
/**
* Copies a BMP piece by piece, just because.
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "bmp.h"