Skip to content

Instantly share code, notes, and snippets.

View jordanhudgens's full-sized avatar

Jordan Hudgens jordanhudgens

View GitHub Profile
axios
.get("yoururl.com/search", { params: { query } })
.then(response => {
console.log(response)
this.results.push(...response.data.guides);
})
.catch(error => {
console.log(error);
});
class SearchController < ApplicationController
def search
@guides = Guide.search_by_term(params[:query])
render json: @guides
end
end
class Guide < ApplicationRecord
include PgSearch
pg_search_scope :search_by_term, against: [:title, :content],
using: {
tsearch: {
any_word: true,
prefix: true
}
}
end
{
"Vue Component": {
"prefix": "vc",
"body": [
"<template>",
" <div>",
" $2",
" </div>",
"</template>",
"",
? 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
cd ~
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history
new Vue({
el: "#app",
data: {
name: "Kristine",
imgWidth: 150,
imgHeight: 150,
showImg: true,
smallImg: true,
medImg: false,
lgImg: false,
<!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">
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?
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)