Skip to content

Instantly share code, notes, and snippets.

View megalithic's full-sized avatar

Seth Messer megalithic

View GitHub Profile
@nathansmith
nathansmith / [1] flag_linkedin_recruiters.js
Last active January 28, 2016 20:07
This function can be used to pre-check (for removal) all recruiters in your LinkedIn connections list.
/*
This function can be used to pre-check (for removal)
all recruiters in your LinkedIn connections list.
It excludes recruiters that are also colleagues, so
you don't accidentally get any false positivies.
It doesn't actually do any deletion, just makes the
connections list focused solely on recruiters. The
deletion itself is up to you.
@mopemope
mopemope / config.fish
Last active June 23, 2022 11:37
config.fish
# Path to Oh My Fish install.
set -gx OMF_PATH /home/ma2/.local/share/omf
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG /home/ma2/.config/omf
set fish_plugins pbcopy
set fish_greeting ""
set -x LC_CTYPE ja_JP.UTF-8
@megalithic
megalithic / radiant
Last active October 25, 2015 21:17
Radiant Player "now playing" applescript; for use with tmux or other CLI applications
#!/usr/bin/env sh
NOW_PLAYING=$(osascript <<EOF
if app_is_running("Radiant Player") then
tell application "Radiant Player"
set artist to current song artist
set track to current song name
set state to player state
if state is 1 then
@marty-wang
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active June 27, 2024 13:34
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
" Window split settings
highlight TermCursor ctermfg=red guifg=red
set splitbelow
set splitright
" Terminal settings
tnoremap <Leader><ESC> <C-\><C-n>
" Window navigation function
" Make ctrl-h/j/k/l move between windows and auto-insert in terminals
" Workspace Setup
" ----------------
function! DefaultWorkspace()
" Rough num columns to decide between laptop and big monitor screens
let numcol = 2
if winwidth(0) >= 220
let numcol = 3
endif
if numcol == 3
@metalelf0
metalelf0 / neovim_colorscheme_patcher.rb
Created September 3, 2015 12:27
Neovim colorscheme patcher to add 24bit colors to terminal
#!/usr/bin/env ruby
class VimColorscheme
attr_accessor :file_path
def initialize(file_path)
@file_path = file_path
end
def extract_colors
@Olical
Olical / fish_prompt.fish
Created August 14, 2015 17:05
My fish shell lambda prompt functions (they go in ~/.config/fish/functions) it's extremely fast too! :D
# A lambda (λ) prompt.
# Green and red depending on exit status.
# Underlined if git status is dirty.
# Uppercase (Λ) if ahead of the remote.
function fish_prompt
if is_status_okay
set_color green
else
set_color red
@jimfb
jimfb / react-refs-must-have-owner.md
Last active July 13, 2019 06:35
addComponentAsRefTo Invariant Violation

You are probably here because you got the following error messages:

addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded.

This usually means one of two things:

  • You are trying to add a ref to an element that is being created outside of a component's render() function.
  • You have multiple (conflicting) copies of React loaded (eg. due to a miss-configured NPM dependency)

Invalid Refs

" NeoBundle
"
if has('vim_starting')
set runtimepath+=~/.nvim/bundle/neobundle.vim/
endif
call neobundle#begin(expand('~/.nvim/bundle'))
NeoBundleFetch 'Shougo/neobundle.vim'
" Completion
NeoBundle 'Shougo/deoplete.nvim'