Skip to content

Instantly share code, notes, and snippets.

Dan Bechard dbechrd

Block or report user

Report or block dbechrd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dbechrd
dbechrd / vocab.txt
Created Sep 4, 2019
A list of words I saw and didn't know the meaning of
View vocab.txt
nadir
ossification
acme
zenith
selcouth
solivagant
assay
anosmic
fomented
tacit
View hugo-post-summary.html
<div class="post-summary">
{{ with .Description }}
{{ (markdownify .) }}
{{ else }}
{{ ((delimit (findRE "(<.*?>(.|\n)*?</.*?>\\s*)+" .Content) "") | truncate (default 200 .Site.Params.summary_length) (default "" .Site.Params.text.truncated ) | replaceRE "&amp;" "&" | safeHTML) }}
{{ end }}
</div>
View alice_score.rb
# Complete the climbingLeaderboard function below.
def climbingLeaderboard(scores, alice)
# Store Alice's position after each game
results = []
# Keep track of Alice's high score so far
alice_max = 0
# For each of Alice's scores
View anagram.c
bool is_anagram(const char *str1, const char *str2)
{
int char_count[128] = { 0 };
int len = strlen(str1);
for (int i = 0; i < len; i++)
{
if (!str1[i] || !str2[i])
return false;
View mg
#!/bin/bash
DEBUG=0
VERBOSE=0
CMDS="args|b|br|co|db|nb|pb|pr|rbm|web"
BRANCH_PREFIX="dlb/"
REPO=`git remote -v | grep -m 1 "(push)" | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"`
_arg_branch_or_current() {
@dbechrd
dbechrd / mustang.vim
Created Sep 20, 2017
My Vim colorscheme
View mustang.vim
" Maintainer: Henrique C. Alves (hcarvalhoalves@gmail.com)
" Version: 1.0
" Last Change: September 25 2008
set background=dark
hi clear
if exists("syntax_on")
syntax reset
View .vimrc
" maximize window on start
if has("gui_running")
"set lines=999 columns=999
autocmd GUIEnter * simalt ~x
endif
set nocompatible " No vi compatibility
set autoindent " use autoindentation
set autoread " reload changed files automatically
set background=dark " colorscheme will assume dark background
@dbechrd
dbechrd / .screenrc-main-example
Last active Sep 20, 2017 — forked from ChrisWills/.screenrc-main-example
A nice default screenrc
View .screenrc-main-example
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Modified by: Dan Bechard dbechrd@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
@dbechrd
dbechrd / addcommas.c
Created Apr 11, 2017
Add commas to string of digits
View addcommas.c
#include <stdio.h>
#include <string.h>
// Cleanup: This is just for Rodney to see what's happening via printf()
void addCommas_debug(const char *num, char *buffer)
{
char temp[100] = {0};
int src = strlen(num) - 1;
int dst = 0;
@dbechrd
dbechrd / BashPrintColor.sh
Last active Aug 29, 2015
Some helpful colored output functions that I use in my Git shell scripts on Windows.
View BashPrintColor.sh
CLR='\e[0m'
RED='\e[00;31m'
GREEN='\e[00;32m'
YELLOW='\e[00;33m'
BLUE='\e[00;34m'
PURPLE='\e[00;35m'
CYAN='\e[00;36m'
LIGHTGRAY='\e[00;37m'
You can’t perform that action at this time.