Skip to content

Instantly share code, notes, and snippets.

View mrcat323's full-sized avatar

Mr CaT mrcat323

View GitHub Profile
@justintv
justintv / .bashrc
Created August 17, 2009 00:53
Display git branch in bash prompt
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
@pksunkara
pksunkara / config
Last active November 15, 2024 16:02
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@DavidToca
DavidToca / git.plugin.zsh
Created July 10, 2012 22:17
oh-my-zsh git alias
# Aliases
alias g='git'
compdef g=git
alias gst='git status'
compdef _git gst=git-status
alias gl='git pull'
compdef _git gl=git-pull
alias gup='git fetch && git rebase'
compdef _git gup=git-fetch
alias gp='git push'
@christiangenco
christiangenco / download website assets
Created January 20, 2014 23:23
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@Brainiarc7
Brainiarc7 / xclip-copy-to-clipboard.md
Created April 26, 2017 17:53
Using xclip to copy terminal content to the clip board on Linux

Using xclip to copy terminal content to the clip board:

Say you want to pipe shell output to your clipboard on Linux. How would you do it? First, choose the clipboard destination, either the Mouse clip or the system clipboard.

For the mouse clipboard, pipe straight to xclip:

echo 123 | xclip

For the system clip board, pipe to xclip and select clip directly:

@brettinternet
brettinternet / check-git-2.sh
Created July 6, 2017 23:54
Check if directory is a git repo or not
# from https://stackoverflow.com/questions/2180270/check-if-current-directory-is-a-git-repository
[ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1
@devinhyden
devinhyden / vuetifyjs-login.html
Last active March 26, 2021 08:14
Vuetifyjs Login Form
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet">
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet">
</head>
<style>
#app {
@duwaljyoti
duwaljyoti / blog
Last active August 15, 2018 09:24
![](http://res.cloudinary.com/coderjay/image/upload/v1520992200/vue.png)|
|:--:|
| Image Courtesy https://vuejobs.com |
# Using Vue Router, Vuex in modular Applications (Laravel).
Hey everyone, some time ago I wrote an article on [using vuex, vue router with laravel](https://medium.com/introcept-hub/using-vue-vuex-vue-router-with-laravel-2c0962c97416). Since this is a kind of sequel to it, I strongly recommend you all get to the article and read it once.
It would be terrible to watch second episode of [Games of thrones](https://en.wikipedia.org/wiki/Game_of_Thrones) without watching the first one right? :wink:
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active July 28, 2024 04:47
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

@mrcat323
mrcat323 / DatePicker.vue
Last active October 22, 2018 14:10
The simple example of styling DatePicker (only single & multiple mode)
<template>
<div id="app">
<v-calendar title-position="right" :formats="forDatePicker" :attributes="action"></v-calendar>
<v-date-picker mode="single" :attributes="action" v-model="action[0].dates" :formats="forDatePicker"></v-date-picker>
</div>
</template>
<script>
import Vue from 'vue'
import VCalendar from 'v-calendar'