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 / Antiscan
Created Dec 3, 2019 — forked from dkrutsko/Antiscan
Detects whether the memory of your process has been scanned
View Antiscan
// Link with psapi.lib
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <Psapi.h>
int main (void)
{
@dbechrd
dbechrd / spec_trace.rb
Created Oct 21, 2019
Ruby trace logger
View spec_trace.rb
#----------------------------------------------------------------------------------------
# Example Usage (RSpec)
#----------------------------------------------------------------------------------------
# Define a trace object. Syntax is as follows:
#
# let (:trace) {
# SpecTrace.new({
# Module::ClassA => { exclude: [:method_to_ignore, :another_method_to_ignore] }
# Module::ClassB => { include: [:method_to_trace, :another_method_to_trace] },
# })
@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'
You can’t perform that action at this time.