Skip to content

Instantly share code, notes, and snippets.

View pfernandez's full-sized avatar

Paul Fernandez pfernandez

View GitHub Profile
@vschmidt94
vschmidt94 / retro_gruvbox_linux_wallpaper.svg
Last active July 27, 2023 20:19
A retro / vintage Linux wallpaper with dark gruvbox colors
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import React, { useState, useContext } from 'react';
const AppContext = React.createContext({});
const App = () => {
const [lang, setLang] = useState('en');
const [color, setColor] = useState('blue');
const store = {
lang: { get: lang, set: setLang },
@TSFoster
TSFoster / script.js
Created March 22, 2018 01:15
Open files in existing neovim instance in iTerm
/*
Requirements:
* iTerm
* nvim
* nvr
Install:
1. New application in Automator
2. Add Run JavaScript action
@manasthakur
manasthakur / submodules.md
Last active July 18, 2024 01:54
Using git submodules to version-control Vim plugins

Using git-submodules to version-control Vim plugins

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.

Creating the repository

Initialize a git repository inside your .vim directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:

cd ~/.vim
@zehnpaard
zehnpaard / simple-compojure.core.clj
Created October 30, 2016 06:03
Simple Compojure Demo with GET/POST forms
(ns simple-compojure.core
(require
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.params :as p]
[simple-compojure.middleware :as m]
[simple-compojure.routes :as r]
))
(def app
(-> r/routes
@samkahchiin
samkahchiin / macvim
Last active September 30, 2023 22:15
- How to set the default font size in macvim
# Open Terminal
vim ~/.vimrc
# Mac OS-X -> .vimrc ; Window -> .gvimrc
# Add it in the file and adjust the font size (h12) accordingly
set guifont=Menlo\ Regular:h15
anonymous
anonymous / tmux.conf
Created September 9, 2014 18:35
vim friendly tmux configuration
#Prefix is Ctrl-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
#Mouse works as expected
@AyeGill
AyeGill / physics.lisp
Created January 2, 2013 07:19
physics simulation system in common lisp.
(defclass world ()
((points :initform (make-hash-table) :accessor points)
(rules :initform (make-hash-table) :accessor rules)
(attachments :initform nil :accessor attachments)))
(defclass attachment ()
((point-a :initarg :point-a :accessor point-a)
(point-b :initarg :point-b :accessor point-b)
(rule :initarg :rule :accessor rule)))
;rule is called with arguments point-a point-b to decide force applied to point-a. force applied to point-b is negation of that
" Highlight currently open file in nerdtree
" see http://superuser.com/a/474298/175466
" see http://superuser.com/a/509721/175466
" returns true iff is NERDTree open/active
function! rc:isNTOpen()
return exists("t:NERDTreeBufName") && (bufwinnr(t:NERDTreeBufName) != -1)
endfunction
" returns true iff focused window is NERDTree window