git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Sometimes we need to keep a file in the project but do not want to track the changes, for example the config/configuration file or other setting file.
git
has a solution to do this. First change the file you do not want to be tracked and use the following command.
git update-index --assume-unchanged FILE_NAME
and if you want to track the changes again use this command,
<canvas id="user-icon" width="256" height="256"></canvas> |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do
I got tired on creating new files manually for each new post a write so I put together this little command line task with Thor.
It creates a new file in the _posts directory with today’s date, parses the parameters to command as the post’s title and adds that as a slug to the new file. It then writes a default yaml template to the file (as specified in the script).
Running thor jekyll:new New and shiny post
will for example create the file _posts/2012-12-28-new-and-shiny-post.markdown
, populate it with an yaml template and finally open the file in my favorite editor.
Add the following to your Gemfile:
import React from 'react' | |
import axios, { post } from 'axios'; | |
class SimpleReactFileUpload extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state ={ | |
file:null | |
} |
import {Controller} from '@hotwired/stimulus' | |
import {Editor} from "@tiptap/core" | |
import {Mention} from "@tiptap/extension-mention"; | |
import StarterKit from "@tiptap/starter-kit" | |
export default class extends Controller { | |
static targets = ['input', 'suggestions'] | |
connect() { | |
this.editor = new Editor({ |
rails new
first to generate all of the boilerplate files necessary.rails new .
--css tailwind
as an option on the rails new
call to do this automatically.rails new
will do this automatically but take care if you write any custom SQL that it is SQLite compatible.rails new myapp --devcontainer
but only do this if requested directly.