Skip to content

Instantly share code, notes, and snippets.

View marschhuynh's full-sized avatar
🎯
Focusing

Marsch Huynh marschhuynh

🎯
Focusing
View GitHub Profile
@marschhuynh
marschhuynh / reset-commit-author.md
Created January 26, 2021 09:07
reset-commit-author
git filter-branch --force --commit-filter '
          if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ];
          then
                  export GIT_COMMITTER_NAME="New Name";
                  export GIT_AUTHOR_NAME="New Nam";
                  export GIT_COMMITTER_EMAIL="[email protected]";
                  export GIT_AUTHOR_EMAIL="[email protected]";
          fi;
 git commit-tree "$@"
@marschhuynh
marschhuynh / fish_prompt.fish
Created September 9, 2019 05:05
spacefish config
function fish_prompt
# Store the exit code of the last command
set -g sf_exit_code $status
set -g SPACEFISH_VERSION 2.4.0
# ------------------------------------------------------------------------------
# Configuration
# ------------------------------------------------------------------------------
__sf_util_set_default SPACEFISH_PROMPT_ADD_NEWLINE true
call plug#begin('~/.config/nvim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'dracula/vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'bronson/vim-trailing-whitespace'
Plug 'rakr/vim-one'
# install_certifi.py
#
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
# https://pypi.python.org/pypi/certifi
import os
import os.path
import ssl
import stat
@marschhuynh
marschhuynh / check.md
Last active October 13, 2018 05:08
Check macbook
@marschhuynh
marschhuynh / Websocket warning in react-native ios
Created August 25, 2018 09:15
Websocket warning in react-native ios
Xcode menu -> Product -> Edit Scheme...
Environment Variables -> Add -> Name: "OS_ACTIVITY_MODE", Value:"disable"
Run your app again, done! 😄
@marschhuynh
marschhuynh / reactjs.js
Created July 8, 2018 16:48
Reactjs example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello React</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.1/react.min.js">
</script>
	"A File Icon",
	"All Autocomplete",
	"Anaconda",
	"AutoFileName",
	"Babel",
	"CodeFormatter",
	"DA UI",
	"DocBlockr",
	"DocBlockr_Python",

"Emmet",

import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import { connect } from 'react-redux';
import { Platform } from 'react-native';
import FCM, {
FCMEvent,
RemoteNotificationResult,
WillPresentNotificationResult,
NotificationType,
} from 'react-native-fcm';
@marschhuynh
marschhuynh / copy.md
Last active June 4, 2018 03:33
Copy data in container to host machine

sudo docker run --rm --volumes-from jupyterlab_1 -v $(pwd):/backup busybox tar cvf backup.tar /opt/app/data

--rm: remove the container when it exits --volumes-from DATA: attach to the volumes shared by the DATA container -v $(pwd):/backup: bind mount the current directory into the container; to write the tar file to busybox: a small simpler image - good for quick maintenance tar cvf /backup/backup.tar /data: creates an uncompressed tar file of all the files in the /data directory