Skip to content

Instantly share code, notes, and snippets.

# set-option -g default-terminal "tmux-256color"
# set-option -g status-justify centre
set-option -g status-justify absolute-centre
set-option -g status-position top
set-option -g status-style bg=default
set-option -g status-left-length 60
# Show/Hide Status Bar with hotkey
bind s set-option -g status
@joelremix
joelremix / .tmux.conf
Created December 5, 2021 02:03
tmux.conf
# set -g default-terminal "screen-256color"
# set -g default-terminal "screen.xterm-256color"
# set -g default-terminal "tmux-256color"
set -g default-terminal "screen"
# set -g default-terminal "xterm"
set-option -gw mode-keys vi # vi style key bindings
bind-key -n C-k clear-history
# Source config
@joelremix
joelremix / .vimrc
Last active December 1, 2021 18:00
VIM: vimrc
set nocompatible "Disable vi-compatability. Above everything else to enable certain features below this line
let mapleader = " "
let g:mapleader = " "
set exrc "Allows per-project vimrc files
" set guifont=Monoid\ Nerd\ Font:h14
" set guifont=SauceCodePro\ Nerd\ Font:h15
@joelremix
joelremix / get_string_between.php
Last active November 29, 2021 17:23
PHP: get_string_between()
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$fullstring = "this is my [tag]dog[/tag]";
@joelremix
joelremix / check_broken_image.js
Created September 23, 2016 18:54
jQuery: Check Broken Images
$(document).ready(function(){
// Looping through all image elements
$("img").each( function () {
var element = $(this);
$.ajax({
url:$(this).attr('src'),
type:'get',
async: false,
error:function(response){
@joelremix
joelremix / momentum-scrolling-ios.css
Created April 29, 2014 03:22
CSS: momentum scroll ios
.module {
overflow-y: scroll; /* has to be scroll, not auto */
-webkit-overflow-scrolling: touch;
}
@joelremix
joelremix / vim_update-pathogen-plugins.txt
Created July 20, 2016 21:58
Vim: Update Pathogen Bundles (plugins) via Terminal
for i in ~/.vim/bundle/*; do git -C $i pull; done
@joelremix
joelremix / gist:995ae051d1bc345d30f9cf46a7feeff2
Created July 20, 2016 21:55
Vim: Update blundles (plugins) via Terminal
We couldn’t find that file to show.
@joelremix
joelremix / prevent_scrolling
Created June 15, 2013 17:52
JS: prevent scrolling
document.body.addEventListener('touchmove', function(event) {
event.preventDefault();
}, false);
// http://www.html5rocks.com/en/mobile/touch/
@joelremix
joelremix / JS: self_invoke_function
Last active December 17, 2015 22:19
JS: self invoke function
function hello() {
}()