Skip to content

Instantly share code, notes, and snippets.

View marcusbuffett's full-sized avatar
♟️

Marcus Buffett marcusbuffett

♟️
View GitHub Profile
+/etc/zprofile:2> [ -x /usr/libexec/path_helper ']'
+/etc/zprofile:3> /usr/libexec/path_helper -s
+/etc/zprofile:3> eval 'PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/marcusbuffett/.rvm/gems/ruby-2.3.0/bin:/Users/marcusbuffett/.rvm/gems/ruby-2.3.0@global/bin:/Users/marcusbuffett/.rvm/rubies/ruby-2.3.0/bin:/Users/marcusbuffett/.cabal/bin:/Users/marcusbuffett/Library/Haskell/bin:/Users/marcusbuffett/.local/bin:~/.cargo/bin:/Users/marcusbuffett/go/bin:/Users/marcusbuffett/.rvm/bin:/Users/marcusbuffett/.fzf/bin:/Users/marcusbuffett/.cargo/bin";' export 'PATH;' 'MANPATH="/usr/share/man:/usr/local/share/man:/Users/marcusbuffett/.fzf/man";' export 'MANPATH;'
+(eval):1> PATH='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/marcusbuffett/.rvm/gems/ruby-2.3.0/bin:/Users/marcusbuffett/.rvm/gems/ruby-2.3.0@global/bin:/Users/marcusbuffett/.rvm/rubies/ruby-2.3.0/bin:/Users/marcusbuffett/.cabal/bin:/Users/marcusbuffett/Library/Haskell/bin:/Users/marcusbuffett/.local/bin:~/.cargo/bin:/Users/marcusbuffett/go/
@marcusbuffett
marcusbuffett / prof.log
Created February 2, 2017 22:29
neomake prof
SCRIPT /Users/marcusbuffett/.vim/plugged/neomake/autoload/neomake/makers/ft/java.vim
Sourced 1 time
Total time: 0.000946
Self time: 0.000946
count total (s) self (s)
"============================================================================
"File: java.vim
"Description: Syntax checking plugin for neomake
"Maintainer: Wang Shidong <wsdjeg at outlook dot com>
@marcusbuffett
marcusbuffett / find_unpushed_branches.py
Created June 19, 2019 19:19
Finds branches which are ahead of their remote tracking branch
import os
from subprocess import Popen, PIPE, check_output, STDOUT, CalledProcessError
import shlex
list_branches_command = "git for-each-ref --sort=committerdate refs/heads/ --format='%(refname:short)'"
pipe = Popen(list_branches_command, shell=True, stdout=PIPE)
for branch in pipe.stdout:
branch = branch.strip().decode("utf-8")
get_remote_command = f"git rev-parse --abbrev-ref --symbolic-full-name {branch}@{{u}}"
fn convert_to_html(input: &str) -> String {
let cmd = Command::new("pandoc")
.args(&["--from=markdown", "--to=html"])
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
.expect("pandoc failed to start");
{
let mut pandoc_stdin = cmd.stdin.unwrap();
pandoc_stdin.write_all(& input.as_bytes());
set nocompatible hidden laststatus=2
if !filereadable('/tmp/plug.vim')
silent !curl --insecure -fLo /tmp/plug.vim
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
source /tmp/plug.vim
call plug#begin('/tmp/plugged')
Plug 'lotabout/skim', { 'dir': '~/.skim', 'do': './install' }
#![feature(proc_macro_hygiene, decl_macro)]
#[macro_use]
extern crate rocket;
extern crate anyhow;
extern crate sled;
use rocket_contrib::json::Json;
use serde::{Deserialize, Serialize};
use image::Luma;
use qrcode::QrCode;
fn main() {
let bytes_limit = 2953;
let mut bytes = 1000;
let mut step = 100;
let hitchikers_text = std::fs::read_to_string("hitchhikers.txt").unwrap();
loop {
let head_bytes = hitchikers_text
{
"metadata": {
"kernelspec": {
"name": "python",
"display_name": "Python (Pyodide)",
"language": "python"
},
"language_info": {
"codemirror_mode": {
"name": "python",