Skip to content

Instantly share code, notes, and snippets.

View Nifled's full-sized avatar
👀

Erick Delfin Nifled

👀
View GitHub Profile
@Nifled
Nifled / App.js
Last active August 22, 2018 19:12
React Redux protected routes
const App = ({ location, isAuthenticated }) => (
<div className='ui container'>
{ isAuthenticated && <TopNavigation /> }
<Route location={location} path='/' exact component={HomePage} />
<Route location={location} path='/confirmation/:token' exact component={ConfirmationPage} />
<UserRoute location={location} path='/dashboard' exact component={DashboardPage} />
<UserRoute location={location} path='/books/new' exact component={NewBookPage} />
@Nifled
Nifled / .aliases
Created August 21, 2018 06:43
.aliases
alias gs="git status"
alias gaa="git add -A"
alias gpush="git push origin master"
alias gpull="git pull origin master"
alias gcm="git commit -m"
alias ls="tree -L 1"
alias ls2="tree -L 2"
alias la="tree -a -L 1"
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@Nifled
Nifled / .eslintrc
Created May 19, 2018 07:40
my eslint config - i don't like semicolons
// install the following packages:
// yarn add --dev eslint prettier eslint-config-airbnb@^15.0.1 eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y@^5.1.1
{
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
@Nifled
Nifled / script.sh
Created April 17, 2018 05:51
Bash script to change author on all commits in repo (run inside repo)
#!/bin/sh
git filter-branch --env-filter '
# Replace info here --------------------------------------
OLD_EMAIL="root@TARS2000.localdomain"
CORRECT_NAME="Erick Delfin"
@Nifled
Nifled / ojouson.svg
Created March 16, 2018 06:23
ojo unison
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Nifled
Nifled / unison.svg
Created March 16, 2018 05:47
svg unison
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
DIR='/opt/rambox'
# Remove existing Rambox if exists
if [ -d "$DIR" ]; then
sudo rm -rf /opt/rambox
sudo rm -rf /usr/share/applications/rambox.desktop
fi
# Use C-a as prefix and free C-b
set -g prefix C-a
unbind C-b
# Send C-a to application by pressing it twice
bind C-a send-prefix
# Reload configuration file
unbind r
bind r source-file ~/.tmux.conf \; display "Configration file .tmux reloaded!"
@Nifled
Nifled / .minttyrc
Created June 24, 2017 08:01
Babun .minttyrc
Font=Menlo for Powerline
FontHeight=12
ForegroundColour=211,208,200
BackgroundColour=45,45,45
CursorColour=253,157,79
Black=45,45,45
BoldBlack=116,115,105
Red=242,119,122
BoldRed=236,50,53