$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add bootstrap@4.0.0-beta jquery popper.js
diff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644
$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add bootstrap@4.0.0-beta jquery popper.js
diff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644
Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:
Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.
Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.
Instructions provided for both Fedora and Ubuntu (including Debian):
Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:
... | |
class UpdatePersonName(graphene.Mutation): | |
class Input: | |
uuid = graphene.Int(required=True) | |
name = graphene.String(required=True) | |
person = graphene.Field(Person) |
import graphene | |
from graphene_sqlalchemy import SQLAlchemyConnectionField, SQLAlchemyObjectType | |
from models import * | |
class Person(SQLAlchemyObjectType): | |
class Meta: | |
model = PersonModel | |
interfaces = (graphene.relay.Node, ) |
from flask import Flask | |
from database import db_session | |
from flask_graphql import GraphQLView | |
from schema import schema | |
app = Flask(__name__) | |
app.debug = True | |
app.add_url_rule('/graphql', view_func=GraphQLView.as_view('graphql', schema=schema, graphiql=True, context={'session': db_session})) |
from sqlalchemy import Column, Integer, ForeignKey | |
from sqlalchemy.orm import relationship | |
from database import Base | |
class PersonModel(Base): | |
__tablename__ = 'person' | |
uuid = Column(Integer, primary_key=True) | |
Articles = relationship("ArticleModel") | |
class ArticleModel(Base): |
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base, DeferredReflection | |
from sqlalchemy.orm import scoped_session, sessionmaker | |
connection_string = << your connection string here >> | |
engine = create_engine(connection_string) | |
db_session = scoped_session(sessionmaker(autocommit=False, | |
autoflush=False, | |
bind=engine)) |
If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need.
Thus, you should keep the .vim
directory along with your .vimrc
version-controlled.
But when you have plugins installed inside .vim/bundle
(if you use pathogen), or inside .vim/pack
(if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.
Initialize a git repository inside your .vim
directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:
cd ~/.vim
Let's say the plugin is at a GitHub URL https://github.com/manasthakur/foo
.
First get the plugin by either cloning it (git clone https://github.com/manasthakur.foo.git
) or simply downloading it as a zip (from its GitHub page).
Adding a plugin in Vim is equivalent to adding the plugin's code properly into its runtimepath (includes the $HOME/.vim
directory by default).
For example, if the layout of a plugin foo
is as follows:
foo/autoload/foo.vim
foo/plugin/foo.vim
module Main exposing (..) | |
{-| elm-package install elm-lang/navigation evancz/url-parser | |
-} | |
import Html exposing (Html, caption, div, table, tbody, td, text, th, thead, tr) | |
import Navigation exposing (Location) | |
import String | |
import UrlParser exposing (Parser, (</>), map, oneOf, s, int, string, top, parseHash) |