This file contains hidden or 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
axios | |
.get("yoururl.com/search", { params: { query } }) | |
.then(response => { | |
console.log(response) | |
this.results.push(...response.data.guides); | |
}) | |
.catch(error => { | |
console.log(error); | |
}); |
This file contains hidden or 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
class SearchController < ApplicationController | |
def search | |
@guides = Guide.search_by_term(params[:query]) | |
render json: @guides | |
end | |
end |
This file contains hidden or 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
class Guide < ApplicationRecord | |
include PgSearch | |
pg_search_scope :search_by_term, against: [:title, :content], | |
using: { | |
tsearch: { | |
any_word: true, | |
prefix: true | |
} | |
} | |
end |
This file contains hidden or 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
{ | |
"Vue Component": { | |
"prefix": "vc", | |
"body": [ | |
"<template>", | |
" <div>", | |
" $2", | |
" </div>", | |
"</template>", | |
"", |
This file contains hidden or 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
? Project name your-vue-app-name | |
? Project description A Vue.js project | |
? Author Jordan Hudgens <[email protected]> | |
? Vue build standalone | |
? Install vue-router? Yes | |
? Use ESLint to lint your code? Yes | |
? Pick an ESLint preset Standard | |
? Set up unit tests No | |
? Setup e2e tests with Nightwatch? No | |
? Should we run `npm install` for you after the project has been created? (recommended) npm |
This file contains hidden or 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
cd ~ | |
mv .zsh_history .zsh_history_bad | |
strings .zsh_history_bad > .zsh_history | |
fc -R .zsh_history |
This file contains hidden or 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
new Vue({ | |
el: "#app", | |
data: { | |
name: "Kristine", | |
imgWidth: 150, | |
imgHeight: 150, | |
showImg: true, | |
smallImg: true, | |
medImg: false, | |
lgImg: false, |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='UTF-8'> | |
<title>CSS Grid</title> | |
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=PT+Serif" rel="stylesheet"> | |
<link href="styles.css" rel="stylesheet"> |
This file contains hidden or 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
1. Whats the number one book you have recommended people to read? | |
Deep Work by Cal Newport | |
2. Whats the best or worst advice you have heard from people in your industry? | |
Best: break problems down into small, easy to manage chunks | |
3. What is one failure that has helped you in your career? |
This file contains hidden or 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
from flask import Flask, request, jsonify | |
from flask_sqlalchemy import SQLAlchemy | |
from flask_marshmallow import Marshmallow | |
import os | |
app = Flask(__name__) | |
basedir = os.path.abspath(os.path.dirname(__file__)) | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'crud.sqlite') | |
db = SQLAlchemy(app) | |
ma = Marshmallow(app) |